diff options
Diffstat (limited to 'tools/addon-sdk-1.12/examples/library-detector/data')
-rwxr-xr-x | tools/addon-sdk-1.12/examples/library-detector/data/icons/closure.ico | bin | 1150 -> 0 bytes | |||
-rwxr-xr-x | tools/addon-sdk-1.12/examples/library-detector/data/icons/jquery.ico | bin | 3638 -> 0 bytes | |||
-rwxr-xr-x | tools/addon-sdk-1.12/examples/library-detector/data/icons/jquery_ui.ico | bin | 1150 -> 0 bytes | |||
-rwxr-xr-x | tools/addon-sdk-1.12/examples/library-detector/data/icons/modernizr.ico | bin | 1150 -> 0 bytes | |||
-rwxr-xr-x | tools/addon-sdk-1.12/examples/library-detector/data/icons/mootools.png | bin | 386 -> 0 bytes | |||
-rwxr-xr-x | tools/addon-sdk-1.12/examples/library-detector/data/icons/yui.ico | bin | 6598 -> 0 bytes | |||
-rwxr-xr-x | tools/addon-sdk-1.12/examples/library-detector/data/library-detector.js | 97 | ||||
-rw-r--r-- | tools/addon-sdk-1.12/examples/library-detector/data/panel.html | 16 | ||||
-rwxr-xr-x | tools/addon-sdk-1.12/examples/library-detector/data/widget.html | 50 |
9 files changed, 0 insertions, 163 deletions
diff --git a/tools/addon-sdk-1.12/examples/library-detector/data/icons/closure.ico b/tools/addon-sdk-1.12/examples/library-detector/data/icons/closure.ico Binary files differdeleted file mode 100755 index a8c91a0..0000000 --- a/tools/addon-sdk-1.12/examples/library-detector/data/icons/closure.ico +++ /dev/null diff --git a/tools/addon-sdk-1.12/examples/library-detector/data/icons/jquery.ico b/tools/addon-sdk-1.12/examples/library-detector/data/icons/jquery.ico Binary files differdeleted file mode 100755 index 8df8f38..0000000 --- a/tools/addon-sdk-1.12/examples/library-detector/data/icons/jquery.ico +++ /dev/null diff --git a/tools/addon-sdk-1.12/examples/library-detector/data/icons/jquery_ui.ico b/tools/addon-sdk-1.12/examples/library-detector/data/icons/jquery_ui.ico Binary files differdeleted file mode 100755 index 77e3bd2..0000000 --- a/tools/addon-sdk-1.12/examples/library-detector/data/icons/jquery_ui.ico +++ /dev/null diff --git a/tools/addon-sdk-1.12/examples/library-detector/data/icons/modernizr.ico b/tools/addon-sdk-1.12/examples/library-detector/data/icons/modernizr.ico Binary files differdeleted file mode 100755 index c37d438..0000000 --- a/tools/addon-sdk-1.12/examples/library-detector/data/icons/modernizr.ico +++ /dev/null diff --git a/tools/addon-sdk-1.12/examples/library-detector/data/icons/mootools.png b/tools/addon-sdk-1.12/examples/library-detector/data/icons/mootools.png Binary files differdeleted file mode 100755 index 2a5df7d..0000000 --- a/tools/addon-sdk-1.12/examples/library-detector/data/icons/mootools.png +++ /dev/null diff --git a/tools/addon-sdk-1.12/examples/library-detector/data/icons/yui.ico b/tools/addon-sdk-1.12/examples/library-detector/data/icons/yui.ico Binary files differdeleted file mode 100755 index 06acd8a..0000000 --- a/tools/addon-sdk-1.12/examples/library-detector/data/icons/yui.ico +++ /dev/null diff --git a/tools/addon-sdk-1.12/examples/library-detector/data/library-detector.js b/tools/addon-sdk-1.12/examples/library-detector/data/library-detector.js deleted file mode 100755 index af3a88e..0000000 --- a/tools/addon-sdk-1.12/examples/library-detector/data/library-detector.js +++ /dev/null @@ -1,97 +0,0 @@ -/* -The code in this file is adapted from the original -Library Detector add-on -(https://addons.mozilla.org/en-US/firefox/addon/library-detector/) written by -Paul Bakaus (http://paulbakaus.com/) and made available under the -MIT License (http://www.opensource.org/licenses/mit-license.php). -*/ - -var LD_tests = { - - 'jQuery': { - test: function(win) { - var jq = win.jQuery || win.$ || win.$jq || win.$j; - if(jq && jq.fn && jq.fn.jquery) { - return { version: jq.fn.jquery }; - } else { - return false; - } - } - }, - - 'jQuery UI': { - //phonehome: 'http://jqueryui.com/phone_home', - test: function(win) { - - var jq = win.jQuery || win.$ || win.$jq || win.$j; - if(jq && jq.fn && jq.fn.jquery && jq.ui) { - - var plugins = 'accordion,datepicker,dialog,draggable,droppable,progressbar,resizable,selectable,slider,menu,grid,tabs'.split(','), concat = []; - for (var i=0; i < plugins.length; i++) { if(jq.ui[plugins[i]]) concat.push(plugins[i].substr(0,1).toUpperCase() + plugins[i].substr(1)); }; - - return { version: jq.ui.version, details: concat.length ? 'Plugins used: '+concat.join(',') : '' }; - } else { - return false; - } - - } - }, - - 'MooTools': { - test: function(win) { - if(win.MooTools && win.MooTools.version) { - return { version: win.MooTools.version }; - } else { - return false; - } - } - }, - - 'YUI': { - test: function(win) { - if(win.YAHOO && win.YAHOO.VERSION) { - return { version: win.YAHOO.VERSION }; - } else { - return false; - } - } - }, - - 'Closure': { - test: function(win) { - if(win.goog) { - return { version: '2.0' }; - } - return false; - } - }, - - 'Modernizr': { - test: function(win) { - if(win.Modernizr) { - return { version: win.Modernizr._version }; - } - return false; - } - }, - - -}; - -function testLibraries() { - var win = unsafeWindow; - var libraryList = []; - for(var i in LD_tests) { - var passed = LD_tests[i].test(win); - if (passed) { - let libraryInfo = { - name: i, - version: passed.version - }; - libraryList.push(libraryInfo); - } - } - self.postMessage(libraryList); -} - -testLibraries();
\ No newline at end of file diff --git a/tools/addon-sdk-1.12/examples/library-detector/data/panel.html b/tools/addon-sdk-1.12/examples/library-detector/data/panel.html deleted file mode 100644 index 2829006..0000000 --- a/tools/addon-sdk-1.12/examples/library-detector/data/panel.html +++ /dev/null @@ -1,16 +0,0 @@ -<!-- This Source Code Form is subject to the terms of the Mozilla Public - - License, v. 2.0. If a copy of the MPL was not distributed with this - - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - -<html> -<head> - <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> - <title>Library detector</title> - <script type="text/javascript"> - addon.on('message', function (libraryInfo) { - document.body.innerHTML = libraryInfo; - }); - </script> -</head> -<body></body> -</html> diff --git a/tools/addon-sdk-1.12/examples/library-detector/data/widget.html b/tools/addon-sdk-1.12/examples/library-detector/data/widget.html deleted file mode 100755 index 4ca5b50..0000000 --- a/tools/addon-sdk-1.12/examples/library-detector/data/widget.html +++ /dev/null @@ -1,50 +0,0 @@ -<!-- This Source Code Form is subject to the terms of the Mozilla Public - - License, v. 2.0. If a copy of the MPL was not distributed with this - - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - -<html> -<head> - <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> - <title>Library detector</title> - <style type="text/css" media="all"> - img { - display: inline; - width: 16px; - height: 16px; - } - </style> - <script type="text/javascript"> - var icons = { - 'jQuery' : 'jquery.ico', - 'jQuery UI' : 'jquery_ui.ico', - 'MooTools' : 'mootools.png', - 'YUI' : 'yui.ico', - 'Closure' : 'closure.ico', - 'Modernizr': 'modernizr.ico', - }; - - // Listen for mouse events over icons, in order to send a message up to - // the panel and update its content with library name and version - window.addEventListener('mouseover', function (event) { - if (event.target.tagName == 'IMG') { - addon.port.emit('setLibraryInfo', event.target.title); - } - }, false); - - addon.port.on('update', function (libraries) { - // Cleanup previous content - document.body.innerHTML = ''; - - // Create new updated list of icons - libraries.forEach(function(library) { - var img = document.createElement('img'); - img.setAttribute('src', 'icons/' + icons[library.name]); - img.setAttribute('title', library.name + "<br>Version: " + - library.version); - document.body.appendChild(img); - }); - }); - </script> -</head> -<body></body> -</html> |