├── .gitignore ├── .npmignore ├── icons ├── amp.png ├── d3.png ├── dcjs.png ├── dojo.png ├── glow.png ├── gwt.png ├── ink.png ├── jit.png ├── mdl.png ├── move.png ├── next.png ├── nuxt.png ├── pixi.png ├── rico.png ├── riot.png ├── spry.png ├── two.png ├── vue.png ├── wix.png ├── yui.png ├── yui3.png ├── zurb.png ├── base2.png ├── canjs.png ├── extjs.png ├── framer.png ├── fusejs.png ├── gatsby.png ├── gmaps.png ├── headjs.png ├── icon19.png ├── icon38.png ├── icon48.png ├── jquery.png ├── lodash.png ├── mapbox.png ├── marko.png ├── preact.png ├── pusher.png ├── react.png ├── sammy.png ├── vaadin.png ├── zepto.png ├── amplifyjs.png ├── angular.png ├── angularjs.png ├── backbone.png ├── bootstrap.png ├── brewser.png ├── camanjs.png ├── closure.png ├── createjs.png ├── emberjs.png ├── fastclick.png ├── graphael.png ├── greensock.png ├── hammerjs.png ├── icon128.png ├── isotope.png ├── jquery_ui.png ├── kendoui.png ├── knockout.png ├── leaflet.png ├── matter-js.png ├── mochikit.png ├── modernizr.png ├── momentjs.png ├── mootools.png ├── mustache.png ├── paperjs.png ├── philogl.png ├── polymer.png ├── popcornjs.png ├── prototype.png ├── qooxdoo.png ├── raphael.png ├── requirejs.png ├── rightjs.png ├── shopify.png ├── socketio.png ├── wordpress.png ├── workbox.png ├── yepnope.png ├── flotcharts.png ├── handlebars.png ├── highcharts.png ├── jquerytools.png ├── marionette.png ├── scrollmagic.png ├── sproutcore.png ├── underscore.png ├── jquery_mobile.png ├── processingjs.png └── scriptaculous.png ├── .editorconfig ├── content_scripts ├── detect.js ├── inject.js └── lib_detect.js ├── CONTRIBUTING.md ├── popups ├── libraries.html └── libraries.js ├── package.json ├── LICENSE ├── manifest.json ├── CODE_OF_CONDUCT.md ├── background_scripts └── main.js ├── README.md └── library └── libraries.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /build/* 3 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | * 2 | !library/** 3 | !.npmignore 4 | -------------------------------------------------------------------------------- /icons/amp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/amp.png -------------------------------------------------------------------------------- /icons/d3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/d3.png -------------------------------------------------------------------------------- /icons/dcjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/dcjs.png -------------------------------------------------------------------------------- /icons/dojo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/dojo.png -------------------------------------------------------------------------------- /icons/glow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/glow.png -------------------------------------------------------------------------------- /icons/gwt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/gwt.png -------------------------------------------------------------------------------- /icons/ink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/ink.png -------------------------------------------------------------------------------- /icons/jit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/jit.png -------------------------------------------------------------------------------- /icons/mdl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/mdl.png -------------------------------------------------------------------------------- /icons/move.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/move.png -------------------------------------------------------------------------------- /icons/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/next.png -------------------------------------------------------------------------------- /icons/nuxt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/nuxt.png -------------------------------------------------------------------------------- /icons/pixi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/pixi.png -------------------------------------------------------------------------------- /icons/rico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/rico.png -------------------------------------------------------------------------------- /icons/riot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/riot.png -------------------------------------------------------------------------------- /icons/spry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/spry.png -------------------------------------------------------------------------------- /icons/two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/two.png -------------------------------------------------------------------------------- /icons/vue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/vue.png -------------------------------------------------------------------------------- /icons/wix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/wix.png -------------------------------------------------------------------------------- /icons/yui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/yui.png -------------------------------------------------------------------------------- /icons/yui3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/yui3.png -------------------------------------------------------------------------------- /icons/zurb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/zurb.png -------------------------------------------------------------------------------- /icons/base2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/base2.png -------------------------------------------------------------------------------- /icons/canjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/canjs.png -------------------------------------------------------------------------------- /icons/extjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/extjs.png -------------------------------------------------------------------------------- /icons/framer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/framer.png -------------------------------------------------------------------------------- /icons/fusejs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/fusejs.png -------------------------------------------------------------------------------- /icons/gatsby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/gatsby.png -------------------------------------------------------------------------------- /icons/gmaps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/gmaps.png -------------------------------------------------------------------------------- /icons/headjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/headjs.png -------------------------------------------------------------------------------- /icons/icon19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/icon19.png -------------------------------------------------------------------------------- /icons/icon38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/icon38.png -------------------------------------------------------------------------------- /icons/icon48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/icon48.png -------------------------------------------------------------------------------- /icons/jquery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/jquery.png -------------------------------------------------------------------------------- /icons/lodash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/lodash.png -------------------------------------------------------------------------------- /icons/mapbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/mapbox.png -------------------------------------------------------------------------------- /icons/marko.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/marko.png -------------------------------------------------------------------------------- /icons/preact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/preact.png -------------------------------------------------------------------------------- /icons/pusher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/pusher.png -------------------------------------------------------------------------------- /icons/react.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/react.png -------------------------------------------------------------------------------- /icons/sammy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/sammy.png -------------------------------------------------------------------------------- /icons/vaadin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/vaadin.png -------------------------------------------------------------------------------- /icons/zepto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/zepto.png -------------------------------------------------------------------------------- /icons/amplifyjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/amplifyjs.png -------------------------------------------------------------------------------- /icons/angular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/angular.png -------------------------------------------------------------------------------- /icons/angularjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/angularjs.png -------------------------------------------------------------------------------- /icons/backbone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/backbone.png -------------------------------------------------------------------------------- /icons/bootstrap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/bootstrap.png -------------------------------------------------------------------------------- /icons/brewser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/brewser.png -------------------------------------------------------------------------------- /icons/camanjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/camanjs.png -------------------------------------------------------------------------------- /icons/closure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/closure.png -------------------------------------------------------------------------------- /icons/createjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/createjs.png -------------------------------------------------------------------------------- /icons/emberjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/emberjs.png -------------------------------------------------------------------------------- /icons/fastclick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/fastclick.png -------------------------------------------------------------------------------- /icons/graphael.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/graphael.png -------------------------------------------------------------------------------- /icons/greensock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/greensock.png -------------------------------------------------------------------------------- /icons/hammerjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/hammerjs.png -------------------------------------------------------------------------------- /icons/icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/icon128.png -------------------------------------------------------------------------------- /icons/isotope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/isotope.png -------------------------------------------------------------------------------- /icons/jquery_ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/jquery_ui.png -------------------------------------------------------------------------------- /icons/kendoui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/kendoui.png -------------------------------------------------------------------------------- /icons/knockout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/knockout.png -------------------------------------------------------------------------------- /icons/leaflet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/leaflet.png -------------------------------------------------------------------------------- /icons/matter-js.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/matter-js.png -------------------------------------------------------------------------------- /icons/mochikit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/mochikit.png -------------------------------------------------------------------------------- /icons/modernizr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/modernizr.png -------------------------------------------------------------------------------- /icons/momentjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/momentjs.png -------------------------------------------------------------------------------- /icons/mootools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/mootools.png -------------------------------------------------------------------------------- /icons/mustache.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/mustache.png -------------------------------------------------------------------------------- /icons/paperjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/paperjs.png -------------------------------------------------------------------------------- /icons/philogl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/philogl.png -------------------------------------------------------------------------------- /icons/polymer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/polymer.png -------------------------------------------------------------------------------- /icons/popcornjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/popcornjs.png -------------------------------------------------------------------------------- /icons/prototype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/prototype.png -------------------------------------------------------------------------------- /icons/qooxdoo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/qooxdoo.png -------------------------------------------------------------------------------- /icons/raphael.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/raphael.png -------------------------------------------------------------------------------- /icons/requirejs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/requirejs.png -------------------------------------------------------------------------------- /icons/rightjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/rightjs.png -------------------------------------------------------------------------------- /icons/shopify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/shopify.png -------------------------------------------------------------------------------- /icons/socketio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/socketio.png -------------------------------------------------------------------------------- /icons/wordpress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/wordpress.png -------------------------------------------------------------------------------- /icons/workbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/workbox.png -------------------------------------------------------------------------------- /icons/yepnope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/yepnope.png -------------------------------------------------------------------------------- /icons/flotcharts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/flotcharts.png -------------------------------------------------------------------------------- /icons/handlebars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/handlebars.png -------------------------------------------------------------------------------- /icons/highcharts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/highcharts.png -------------------------------------------------------------------------------- /icons/jquerytools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/jquerytools.png -------------------------------------------------------------------------------- /icons/marionette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/marionette.png -------------------------------------------------------------------------------- /icons/scrollmagic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/scrollmagic.png -------------------------------------------------------------------------------- /icons/sproutcore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/sproutcore.png -------------------------------------------------------------------------------- /icons/underscore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/underscore.png -------------------------------------------------------------------------------- /icons/jquery_mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/jquery_mobile.png -------------------------------------------------------------------------------- /icons/processingjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/processingjs.png -------------------------------------------------------------------------------- /icons/scriptaculous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Abdelaziz18003/Library-Detector-for-Chrome/master/icons/scriptaculous.png -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = true -------------------------------------------------------------------------------- /content_scripts/detect.js: -------------------------------------------------------------------------------- 1 | /** 2 | description: Content script that runs after DOM loaded to look for the Library 3 | Detector meta element. If found, notifies the extension of the 4 | script information 5 | **/ 6 | 7 | function wait() { 8 | var meta = document.getElementById('d41d8cd98f00b204e9800998ecf8427e_lib_detect'); 9 | if (meta) { 10 | chrome.extension.sendMessage(meta.content); 11 | } 12 | } 13 | 14 | window.setTimeout(function() { 15 | wait(); 16 | }, 2500); 17 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | * In order to have a library added to the extension, please ensure that the `test` portion of the block of code for the library includes more than just `window.LIBRARY_HERE` as part of the `if` statement for the existence of a library. In the example below, note that in addition to `win.d3`, `win.d3.select` (one of the API methods) is also being tested for: 4 | ```JavaScript 5 | 'D3': { 6 | icon: 'd3', 7 | url: 'http://d3js.org', 8 | test: function(win) { 9 | if(win.d3 && win.d3.select) { 10 | return { version: win.d3.version }; 11 | } 12 | return false; 13 | } 14 | }, 15 | ``` -------------------------------------------------------------------------------- /popups/libraries.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 33 | 34 | 35 |
36 | 37 | -------------------------------------------------------------------------------- /content_scripts/inject.js: -------------------------------------------------------------------------------- 1 | /** 2 | description: Content script that runs before scripts are parsed to inject 3 | the lib_detect.js script into the document 4 | **/ 5 | 6 | var head = document.getElementsByTagName('head')[0]; 7 | var libScript = document.createElement('script'); 8 | var detectScript = document.createElement('script'); 9 | libScript.src = chrome.extension.getURL('../library/libraries.js'); 10 | detectScript.src = chrome.extension.getURL('content_scripts/lib_detect.js'); 11 | var meta = document.createElement('meta'); 12 | meta.name = 'd41d8cd98f00b204e9800998ecf8427e_lib_detect'; 13 | meta.id = 'd41d8cd98f00b204e9800998ecf8427e_lib_detect'; 14 | head.appendChild(meta); 15 | head.appendChild(libScript); 16 | head.appendChild(detectScript); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "js-library-detector", 3 | "version": "5.4.0", 4 | "description": "Detects the JavaScript libraries running on a page", 5 | "main": "library/libraries.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/johnmichel/Library-Detector-for-Chrome.git" 12 | }, 13 | "keywords": [ 14 | "javascript", 15 | "libraries", 16 | "googlechrome" 17 | ], 18 | "author": "John Michel ", 19 | "license": "MIT", 20 | "bugs": { 21 | "url": "https://github.com/johnmichel/Library-Detector-for-Chrome/issues" 22 | }, 23 | "homepage": "https://github.com/johnmichel/Library-Detector-for-Chrome#readme" 24 | } 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2010-2016 Andrew Bredow, John Michel, and other contributors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /popups/libraries.js: -------------------------------------------------------------------------------- 1 | /** 2 | description: Runs whenever the popup is created in a tab 3 | **/ 4 | 5 | var addLibrary = function(library) { 6 | var container = document.createElement('div'); 7 | var link = document.createElement('a'); 8 | 9 | link.href = library.url; 10 | link.innerHTML = library.name; 11 | link.setAttribute('style', "background: transparent url('../icons/" + library.icon + ".png') no-repeat left center; background-size: contain;"); 12 | link.target = '_blank'; 13 | 14 | container.appendChild(link); 15 | 16 | var version = document.createElement('span'); 17 | if (library.version !== undefined || library.version !== 'undefined' || library.version !== null || library.version !== '') { 18 | version.innerHTML = ' ' + library.version; 19 | container.appendChild(version); 20 | } 21 | 22 | document.getElementById('libraries').appendChild(container); 23 | }; 24 | 25 | var handlePageLoad = function() { 26 | chrome.tabs.getSelected(null, function(tab) { 27 | var libraries = JSON.parse(localStorage.getItem('libraries_'+tab.id)); 28 | if (libraries === null) return; 29 | for (var i=0, j=libraries.length; i < j; i++) { 30 | addLibrary(libraries[i]); 31 | } 32 | }); 33 | }; 34 | 35 | window.addEventListener("load", handlePageLoad, false); -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "Library Detector", 4 | "version": "5.4.0", 5 | "web_accessible_resources": [ 6 | "library/libraries.js", 7 | "content_scripts/lib_detect.js" 8 | ], 9 | "description": "Detects the Javascript libraries running on a page and displays their icons in the address bar.", 10 | "icons": { 11 | "48": "icons/icon48.png", 12 | "128": "icons/icon128.png" 13 | }, 14 | "background": { 15 | "scripts": [ 16 | "library/libraries.js", 17 | "background_scripts/main.js" 18 | ] 19 | }, 20 | "page_action": { 21 | "default_icon": { 22 | "19": "icons/icon19.png", 23 | "38": "icons/icon38.png" 24 | }, 25 | "default_title": "Library Detector" 26 | }, 27 | "permissions": [ 28 | "tabs", 29 | "http://*/*", 30 | "https://*/*" 31 | ], 32 | "content_scripts": [ 33 | { 34 | "matches": ["http://*/*", "https://*/*"], 35 | "js": ["content_scripts/inject.js"], 36 | "run_at": "document_end" 37 | }, 38 | { 39 | "matches": ["http://*/*", "https://*/*"], 40 | "js": ["content_scripts/detect.js"], 41 | "run_at": "document_idle" 42 | } 43 | ] 44 | } 45 | -------------------------------------------------------------------------------- /content_scripts/lib_detect.js: -------------------------------------------------------------------------------- 1 | /** 2 | description: Injected into document by inject.js to create a meta element with 3 | any recognized JS libraries. 4 | **/ 5 | (function() { 6 | 7 | /** 8 | * Returns library, version pairs in format: 9 | * libraryName:version,libraryName:version... 10 | */ 11 | async function wait() { 12 | var encodeLibraries = function(libraries) { 13 | var encoded = []; 14 | for (var i = 0; i < libraries.length; i++) { 15 | encoded.push(libraries[i].name + ':' + libraries[i].version); 16 | } 17 | return encoded.join(','); 18 | }; 19 | 20 | var detectLibraries = async function () { 21 | var tests = d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests; 22 | var libraries = []; 23 | for (var i in tests) { 24 | try { 25 | var result = await tests[i].test(window); 26 | if (result === false) continue; 27 | libraries.push({ 28 | name: i, 29 | version: result.version 30 | }); 31 | } catch(e) { 32 | console.log('Library Detector test for ' + i + ' failed:', e); 33 | } 34 | } 35 | return libraries; 36 | }; 37 | 38 | if (window === top) { 39 | var libs = await detectLibraries(); 40 | if (libs.length > 0) { 41 | document.getElementById('d41d8cd98f00b204e9800998ecf8427e_lib_detect').content = encodeLibraries(libs); 42 | } 43 | } 44 | } 45 | 46 | window.setTimeout(async function() { 47 | await wait(); 48 | }, 2000); 49 | 50 | })(); 51 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at johnmichel@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /background_scripts/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | description: Responds to notification from the Content Script and displays the icon 3 | **/ 4 | 5 | var libraries; 6 | var library; 7 | var tabId; 8 | var Libraries = d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests; 9 | 10 | /** 11 | * Parse the data from the meta tag 12 | */ 13 | function parseLibraries(libs) { 14 | if (libs.length === 0) { 15 | return []; 16 | } 17 | var libkeys = []; 18 | libs = libs.split(','); 19 | for (var i=0; i 1 ? libraries.length + ' libraries detected' : library.name + ' ' + library.version 67 | }); 68 | chrome.pageAction.setPopup({ 69 | 'tabId': tabId, 70 | 'popup': '../popups/libraries.html' 71 | }); 72 | 73 | localStorage.setItem('libraries_' + tabId, JSON.stringify(libraries)); 74 | 75 | chrome.pageAction.show(tabId); 76 | } 77 | 78 | /** 79 | * Use a canvas to add an overlay to the icon, if necessary, return the pixel data 80 | */ 81 | function getIcon(iconName, count) { 82 | var image = document.createElement('canvas'); 83 | image.width = 19; 84 | image.height = 19; 85 | var context = image.getContext('2d'); 86 | var icon = new Image; 87 | icon.src = '../icons/'+iconName+'.png'; 88 | icon.addEventListener('load', function() { 89 | context.drawImage(icon, 0, 0, 19, 19); 90 | if (count > 1) { 91 | // overlay circle 92 | var x = 13; 93 | var y = 13; 94 | var radius = 5.5; 95 | var startAngle = 0; 96 | var endAngle = 2 * Math.PI; 97 | var counterClockwise = false; 98 | var lineWidth = 1; 99 | var lineColor = 'black'; 100 | var fillColor = 'white'; 101 | context.beginPath(); 102 | context.arc(x, y, radius, startAngle, endAngle, counterClockwise); 103 | context.closePath(); 104 | context.lineWidth = lineWidth; 105 | context.strokeStyle = lineColor; 106 | context.stroke(); 107 | context.fillStyle = fillColor; 108 | context.fill(); 109 | // overlay number 110 | var txtX = 15.75; 111 | var txtY = 19; 112 | var txtFont = '10px Monospace'; 113 | var txtColor = 'black'; 114 | if (count >= 10) { 115 | txtX = 17.75; 116 | } 117 | context.font = txtFont; 118 | context.fillStyle = txtColor; 119 | context.textBaseline = 'bottom'; 120 | context.textAlign = 'right'; 121 | context.fillText(count, txtX, txtY); 122 | } 123 | dispatch(context.getImageData(0, 0, 19, 19)); 124 | }, false); 125 | } 126 | 127 | chrome.extension.onMessage.addListener(function(library, sender, sendResponse) { 128 | run(library, sender.tab.id); 129 | }); 130 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [Library Detector For Chrome](https://chrome.google.com/webstore/detail/library-detector/cgaocdmhkmfnkdkbnckgmpopcbpaaejo?hl=en) 2 | =========================== 3 | 4 | [![](https://img.shields.io/chrome-web-store/v/cgaocdmhkmfnkdkbnckgmpopcbpaaejo.svg?style=flat-square) 5 | ![](https://img.shields.io/chrome-web-store/d/cgaocdmhkmfnkdkbnckgmpopcbpaaejo.svg?style=flat-square) 6 | ![](https://img.shields.io/chrome-web-store/stars/cgaocdmhkmfnkdkbnckgmpopcbpaaejo.svg?style=flat-square) 7 | ![](https://img.shields.io/chrome-web-store/rating-count/cgaocdmhkmfnkdkbnckgmpopcbpaaejo.svg?style=flat-square)](https://chrome.google.com/webstore/detail/library-detector/cgaocdmhkmfnkdkbnckgmpopcbpaaejo?hl=en) 8 | 9 | [![](https://img.shields.io/npm/v/js-library-detector.svg?style=flat-square)](https://npm.im/js-library-detector) 10 | 11 | The Library Detector extension discovers which JavaScript libraries are being 12 | utilized on webpages that you visit and displays their icons on the Chrome Menu. Currently 13 | supports: 14 | 15 | - [AMP](https://ampproject.org/) 16 | - [AmplifyJS](http://amplifyjs.com/) 17 | - [Angular](https://angular.io) 18 | - [AngularJS](https://angularjs.org/) 19 | - [Backbone.js](http://backbonejs.org/) 20 | - [base2](https://code.google.com/p/base2/) 21 | - [boomerang](https://soasta.github.io/boomerang/) 22 | - [Bootstrap](http://getbootstrap.com/) 23 | - [Brewser](https://robertpataki.github.io/brewser/) 24 | - [CamanJS](http://camanjs.com/) 25 | - [CanJS](https://canjs.com/) 26 | - [ControlJS](https://stevesouders.com/controljs/) 27 | - [CreateJS](https://createjs.com/) 28 | - [D3](https://d3js.org/) 29 | - [DC.js](https://dc-js.github.io/dc.js/) 30 | - [Dojo](https://dojotoolkit.org/) 31 | - [Ember.js](https://emberjs.com/) 32 | - [Ext JS](https://www.sencha.com/products/extjs/) 33 | - [Fabric.js](http://fabricjs.com/) 34 | - [FlexSlider](https://woocommerce.com/flexslider/) 35 | - [Flot Charts](http://www.flotcharts.org/) 36 | - [Foundation](https://foundation.zurb.com/) 37 | - [Framer](https://framer.com/) 38 | - [FuseJS](http://kiro.me/projects/fuse.html) 39 | - [Glow](http://www.bbc.co.uk/glow/) 40 | - [Google Closure](https://developers.google.com/closure/) 41 | - [Google Maps](https://developers.google.com/maps/) 42 | - [GWT](http://www.gwtproject.org/) 43 | - [gRaphaël](https://github.com/DmitryBaranovskiy/g.raphael) 44 | - [Greensock JS](https://greensock.com/gsap) 45 | - [Hammer.js](http://hammerjs.github.io/) 46 | - [Handlebars](http://handlebarsjs.com/) 47 | - [HeadJS](http://headjs.com/) 48 | - [Highcharts](http://www.highcharts.com/) 49 | - [IfVisible.js](http://serkanyersen.github.io/ifvisible.js/) 50 | - [InfoVis](http://philogb.github.io/jit/) 51 | - [Ink](http://ink.sapo.pt/) 52 | - [Isotope](https://isotope.metafizzy.co/) 53 | - [jQuery](http://jquery.com/) 54 | - [jQuery Tools](http://jquerytools.github.io/) 55 | - [jQuery UI](http://jqueryui.com/) 56 | - [Knockout](http://knockoutjs.com/) 57 | - [LABjs](https://github.com/getify/LABjs) 58 | - [Leaflet](http://leafletjs.com/) 59 | - [Lodash](https://lodash.com/) 60 | - [Mapbox](https://www.mapbox.com/mapbox.js/) 61 | - [Marionette](https://marionettejs.com/) 62 | - [Marko js](https://markojs.com/) 63 | - [Material Design Lite](https://getmdl.io/) 64 | - [Matter.js](http://brm.io/matter-js/) 65 | - [MochiKit](http://mochi.github.io/mochikit/) 66 | - [Modernizr](https://modernizr.com/) 67 | - [Moment.js](http://momentjs.com/) 68 | - [Moment Timezone](http://momentjs.com/timezone/) 69 | - [MooTools](https://mootools.net/) 70 | - [Move.js](https://visionmedia.github.io/move.js/) 71 | - [Mustache.js](https://mustache.github.io/) 72 | - [Numeral.js](http://numeraljs.com/) 73 | - [Paper.js](http://paperjs.org/) 74 | - [PhiloGL](http://www.senchalabs.org/philogl/) 75 | - [Pixi.js](http://www.pixijs.com/) 76 | - [Polymer](https://www.polymer-project.org/) 77 | - [Processing.js](http://processingjs.org/) 78 | - [Prototype](http://prototypejs.org/) 79 | - [Pusher](https://pusher.com/docs/javascript_quick_start) 80 | - [Qooxdoo](http://www.qooxdoo.org/) 81 | - [Raphaël](http://raphaeljs.com/) 82 | - [React](https://reactjs.org/) 83 | - [RequireJS](http://requirejs.org/) 84 | - [Rico](http://openrico.sourceforge.net/examples/index.html) 85 | - [Riot](http://riotjs.com/) 86 | - [RightJS](http://rightjs.org/) 87 | - [Sammy.js](http://sammyjs.org/) 88 | - [Script.aculo.us](https://script.aculo.us/) 89 | - [Sea.js](https://seajs.github.io/seajs/docs/) 90 | - [Socket.IO](https://socket.io/) 91 | - [SPF](https://youtube.github.io/spfjs/) 92 | - [Spine](http://spine.github.io/) 93 | - [SproutCore](http://sproutcore.com/) 94 | - [Spry](https://github.com/adobe/Spry) 95 | - [SWFObject](https://github.com/swfobject/swfobject) 96 | - [Swiffy](https://developers.google.com/swiffy/) 97 | - [Three.js](https://threejs.org/) 98 | - [Tween.js](https://github.com/tweenjs/tween.js) 99 | - [Underscore](http://underscorejs.org/) 100 | - [Vaadin](https://vaadin.com/) 101 | - [Velocity.js](http://julian.com/research/velocity/) 102 | - [Visibility.js](https://github.com/ai/visibilityjs) 103 | - [Vue.js](https://vuejs.org/) 104 | - [Web Font Loader](https://github.com/typekit/webfontloader) 105 | - [Yepnope](http://yepnopejs.com/) 106 | - [YUI](https://yuilibrary.com/) 107 | - [Zepto](http://zeptojs.com/) 108 | 109 | 110 | ### To run the development version of the plugin 111 | 1. Clone the Git repo from Github `git clone git@github.com:johnmichel/Library-Detector-for-Chrome.git LibraryDetector` 112 | 2. Navigate to `chrome://extensions` in Chrome 113 | 3. Expand the "Developer Mode" section 114 | 4. Click "Load unpacked extension..." and select the `LibraryDetector` folder 115 | 116 | ### Contributors 117 | - [Andrew Bredow](http://andrewbredow.com) 118 | - [John Michel](https://cowbird.org) 119 | - [Artem Nezvigin](http://artnez.com) (Multiple library icon concept) 120 | - [Karl Swedberg](https://karlswedberg.com/) 121 | - [Joseph Lust](https://lustforge.com/) 122 | - [Eliot Sykes](https://www.eliotsykes.com) 123 | - [John-David Dalton](http://allyoucanleet.com/) 124 | - [Tan Le](https://github.com/tancnle) 125 | - [Serkan Yerşen](http://serkan.io/) 126 | - [Robert Pataki](https://robertpataki.com/) 127 | - [Andrii Vakarev](https://github.com/avakarev) 128 | - [Allan Esquina](https://github.com/allanesquina) 129 | - [Derek Peterson](http://www.derekpetey.com/) 130 | - [Arnaud Ligny](http://narno.org) 131 | - [Adrian Chia](https://github.com/adrianchia) 132 | - [Julian Shapiro](https://www.julian.com/) 133 | - [Olov Günther-Hanssen](https://github.com/eolognt) 134 | - [Dmitri Suvorov](https://github.com/suvjunmd) 135 | - [Andrii Vakarev](https://github.com/avakarev) 136 | - [François Richard](https://github.com/iamWh1sp3r) 137 | - [Derek Peterson](https://derekpeterson.me/) 138 | - [Artem Riasnianskyi](https://github.com/asci) 139 | - [Piotr Kaminski](https://github.com/pkaminski) 140 | - [Cristian Douce](https://github.com/cristiandouce) 141 | - [Vinicius Reis](https://github.com/vinicius73) 142 | - [Rick Viscomi](https://github.com/rviscomi) 143 | - [Emmanuel Krebs](https://github.com/e-krebs) 144 | - [Patrick Hulce](https://github.com/patrickhulce) 145 | - [Ajaykumar Prathap](https://github.com/ajay2507) 146 | 147 | ### Inspiration 148 | Library detection class inspired by [Paul Bakaus'](https://paulbakaus.com/) [Library Detector for Firefox](https://addons.mozilla.org/en-us/firefox/addon/library-detector/) 149 | -------------------------------------------------------------------------------- /library/libraries.js: -------------------------------------------------------------------------------- 1 | var UNKNOWN_VERSION = null; 2 | var d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests = { 3 | 4 | 'GWT': { 5 | icon: 'gwt', 6 | url: 'http://www.gwtproject.org/', 7 | test: function(win) { 8 | // pretty complicated, many possible tell tales 9 | var doc = win.document, 10 | hasHistFrame = doc.getElementById('__gwt_historyFrame'), 11 | hasGwtUid = doc.gwt_uid, 12 | hasBodyListener = doc.body.__listener, 13 | hasBodyEventBits = doc.body.__eventBits, 14 | hasModules = win.__gwt_activeModules, 15 | hasJsonP = win.__gwt_jsonp__, 16 | hasRootWinApp = win.__gwt_scriptsLoaded || win.__gwt_stylesLoaded || win.__gwt_activeModules; 17 | 18 | // use the many possible indicators 19 | if(hasHistFrame || hasGwtUid || hasBodyListener || hasBodyEventBits || hasModules || hasJsonP || hasRootWinApp) { 20 | 21 | // carefully look at frames, but only if certain is GWT frame 22 | var frames = doc.getElementsByTagName('iframe'), 23 | gwtVersion = UNKNOWN_VERSION; 24 | for(var n=0; n= 3.2.0 detection 88 | if(win.$.fn[component].Constructor && win.$.fn[component].Constructor.VERSION) { 89 | bootstrapVersion = win.$.fn[component].Constructor.VERSION; 90 | return true; 91 | // Bootstrap >= 2.0.0 and <= 3.1.0 detection 92 | } else if(new RegExp(RE_PREFIX_V3 + component).test(win.$.fn[component].toString())) { 93 | bootstrapVersion = '>= 3.0.0 & <= 3.1.1'; 94 | return true; 95 | // Bootstrap < 3.1.0 detection 96 | } else if(new RegExp(RE_PREFIX_V2 + component).test(win.$.fn[component].toString())) { 97 | bootstrapVersion = '>= 2.0.0 & <= 2.3.2'; 98 | return true; 99 | } 100 | } 101 | 102 | return false; 103 | }); 104 | 105 | if (bootstrapVersion) { 106 | return { version: bootstrapVersion }; 107 | } 108 | } 109 | 110 | return false; 111 | } 112 | }, 113 | 114 | 'Zurb': { 115 | icon: 'zurb', 116 | url: 'https://foundation.zurb.com/', 117 | npm: 'foundation-sites', 118 | test: function(win) { 119 | if(win.Foundation && win.Foundation.Toggler) { 120 | return { version: win.Foundation.version || UNKNOWN_VERSION }; 121 | } 122 | return false; 123 | } 124 | }, 125 | 126 | 'Polymer': { 127 | icon: 'polymer', 128 | url: 'https://www.polymer-project.org/', 129 | npm: '@polymer/polymer', 130 | test: function(win) { 131 | if(win.Polymer && win.Polymer.dom) { 132 | return { version: win.Polymer.version || UNKNOWN_VERSION }; 133 | } 134 | return false; 135 | } 136 | }, 137 | 138 | 'Highcharts': { 139 | icon: 'highcharts', 140 | url: 'http://www.highcharts.com', 141 | npm: 'highcharts', 142 | test: function(win) { 143 | if(win.Highcharts && win.Highcharts.Point) { 144 | return { version: win.Highcharts.version || UNKNOWN_VERSION }; 145 | } 146 | return false; 147 | } 148 | }, 149 | 150 | 'InfoVis': { 151 | icon: 'jit', 152 | url: 'http://philogb.github.com/jit/', 153 | test: function test(win) { 154 | if(win.$jit && win.$jit.PieChart) { 155 | return { version: win.$jit.version || UNKNOWN_VERSION }; 156 | } 157 | return false; 158 | } 159 | }, 160 | 161 | 'FlotCharts': { 162 | icon: 'flotcharts', 163 | url: 'http://www.flotcharts.org/', 164 | npm: 'flot', 165 | test: function(win) { 166 | if(win.$ && win.$.plot) { 167 | return { version: win.$.plot.version || UNKNOWN_VERSION}; 168 | } 169 | return false; 170 | } 171 | }, 172 | 173 | 'CreateJS': { 174 | icon: 'createjs', 175 | url: 'https://createjs.com/', 176 | npm: 'createjs', 177 | test: function(win) { 178 | if(win.createjs && win.createjs.promote) { 179 | return { version: UNKNOWN_VERSION}; // no version info available 180 | } 181 | return false; 182 | } 183 | }, 184 | 185 | 'Google Maps': { 186 | icon: 'gmaps', 187 | url: 'https://developers.google.com/maps/', 188 | test: function(win) { 189 | if (win.google && win.google.maps) { 190 | return { version: win.google.maps.version || UNKNOWN_VERSION }; 191 | } 192 | return false; 193 | } 194 | }, 195 | 196 | 'jQuery': { 197 | icon: 'jquery', 198 | url: 'http://jquery.com', 199 | npm: 'jquery', 200 | test: function(win) { 201 | var jq = win.jQuery || win.$; 202 | if (jq && jq.fn) { 203 | return { version: jq.fn.jquery.replace(/[^\d+\.+]/g, '') || UNKNOWN_VERSION}; 204 | } 205 | return false; 206 | } 207 | }, 208 | 209 | 'jQuery UI': { 210 | icon: 'jquery_ui', 211 | url: 'http://jqueryui.com', 212 | npm: 'jquery-ui', 213 | test: function(win) { 214 | var jq = win.jQuery || win.$ || win.$jq || win.$j; 215 | if(jq && jq.fn && jq.fn.jquery && jq.ui) { 216 | var plugins = 'accordion,datepicker,dialog,draggable,droppable,progressbar,resizable,selectable,slider,menu,grid,tabs'.split(','), concat = []; 217 | 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)); } 218 | return { version: jq.ui.version || UNKNOWN_VERSION, details: concat.length ? 'Plugins used: '+concat.join(',') : '' }; 219 | } 220 | return false; 221 | } 222 | }, 223 | 224 | 'Dojo': { 225 | icon: 'dojo', 226 | url: 'http://dojotoolkit.org', 227 | npm: 'dojo', 228 | test: function(win) { 229 | if(win.dojo && win.dojo.delegate) { 230 | var version = win.dojo.version ? win.dojo.version.toString() : UNKNOWN_VERSION; 231 | return { version: version, details: 'Details: '+(win.dijit ? 'Uses Dijit' : 'none') }; 232 | } 233 | return false; 234 | } 235 | }, 236 | 237 | 'Prototype': { 238 | icon: 'prototype', 239 | url: 'http://prototypejs.org', 240 | test: function(win) { 241 | if(win.Prototype && win.Prototype.BrowserFeatures) { 242 | return { version: win.Prototype.Version || UNKNOWN_VERSION }; 243 | } 244 | return false; 245 | } 246 | }, 247 | 248 | 'Scriptaculous': { 249 | icon: 'scriptaculous', 250 | url: 'http://script.aculo.us', 251 | test: function(win) { 252 | if(win.Scriptaculous && win.Scriptaculous.load) { 253 | return { version: win.Scriptaculous.Version || UNKNOWN_VERSION }; 254 | } 255 | return false; 256 | } 257 | }, 258 | 259 | 'MooTools': { 260 | icon: 'mootools', 261 | url: 'https://mootools.net/', 262 | test: function(win) { 263 | if(win.MooTools && win.MooTools.build) { 264 | return { version: win.MooTools.version || UNKNOWN_VERSION }; 265 | } 266 | return false; 267 | } 268 | }, 269 | 270 | 'Spry': { 271 | icon: 'spry', 272 | url: 'http://labs.adobe.com/technologies/spry', 273 | test: function(win) { 274 | if (win.Spry && win.Spry.Data) { 275 | return { version: UNKNOWN_VERSION }; 276 | } 277 | return false; 278 | } 279 | }, 280 | 281 | 'YUI 2': { 282 | icon: 'yui', 283 | url: 'http://developer.yahoo.com/yui/2/', 284 | test: function(win) { 285 | if (win.YAHOO && win.YAHOO.util) { 286 | return { version: win.YAHOO.VERSION || UNKNOWN_VERSION }; 287 | } 288 | return false; 289 | } 290 | }, 291 | 292 | 'YUI 3': { 293 | icon: 'yui3', 294 | url: 'https://yuilibrary.com/', 295 | npm: 'yui', 296 | test: function(win) { 297 | if (win.YUI && win.YUI.Env) { 298 | return { version: win.YUI.version || UNKNOWN_VERSION }; 299 | } 300 | return false; 301 | } 302 | }, 303 | 304 | 'Qooxdoo': { 305 | icon: 'qooxdoo', 306 | url: 'http://www.qooxdoo.org/', 307 | npm: 'qooxdoo', 308 | test: function(win) { 309 | if(win.qx && win.qx.Bootstrap) { 310 | return { version: UNKNOWN_VERSION }; 311 | } 312 | return false; 313 | } 314 | }, 315 | 316 | 'Ext JS': { 317 | icon: 'extjs', 318 | url: 'https://www.sencha.com/products/extjs/', 319 | test: function(win) { 320 | if (win.Ext && win.Ext.versions) { 321 | return { version: win.Ext.versions.core.version }; 322 | } 323 | else if(win.Ext) { 324 | return { version: win.Ext.version || UNKNOWN_VERSION }; 325 | } 326 | return false; 327 | } 328 | }, 329 | 330 | 'base2': { 331 | icon: 'base2', 332 | url: 'http://code.google.com/p/base2', 333 | test: function(win) { 334 | if(win.base2 && win.base2.dom) { 335 | return { version: win.base2.version || UNKNOWN_VERSION }; 336 | } 337 | return false; 338 | } 339 | }, 340 | 341 | 'Closure Library': { 342 | icon: 'closure', 343 | url: 'https://developers.google.com/closure/library/', 344 | npm: 'google-closure-library', 345 | test: function(win) { 346 | if(win.goog && win.goog.provide) { 347 | return { version: UNKNOWN_VERSION }; 348 | } 349 | return false; 350 | } 351 | }, 352 | 353 | 'Raphaël': { 354 | icon: 'raphael', 355 | url: 'http://dmitrybaranovskiy.github.io/raphael/', 356 | test: function(win) { 357 | if (win.Raphael && win.Raphael.circle) { 358 | return { version: win.Raphael.version || UNKNOWN_VERSION }; 359 | } 360 | return false; 361 | } 362 | }, 363 | 364 | 'React': { 365 | icon: 'react', 366 | url: 'https://reactjs.org/', 367 | npm: 'react', 368 | test: function(win) { 369 | function isMatch(node) { 370 | return node!=null && node._reactRootContainer!=null; 371 | } 372 | function nodeFilter(node) { 373 | return isMatch(node) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; 374 | } 375 | var reactRoot = document.getElementById('react-root'); 376 | var altHasReact = document.querySelector('*[data-reactroot]'); 377 | var bodyReactRoot = isMatch(document.body) || isMatch(document.body.firstElementChild); 378 | var hasReactRoot = bodyReactRoot|| document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT, nodeFilter).nextNode() != null; 379 | if (hasReactRoot || reactRoot && reactRoot.innerText.length > 0 || altHasReact || win.React && win.React.Component) { 380 | return { version: win.React && win.React.version || UNKNOWN_VERSION }; 381 | } 382 | return false; 383 | } 384 | }, 385 | 386 | 'Next.js': { 387 | icon: 'next', 388 | url: 'https://nextjs.org/', 389 | npm: 'next', 390 | test: function(win) { 391 | if (win.__NEXT_DATA__ && win.__NEXT_DATA__.buildId) { 392 | return { version: UNKNOWN_VERSION }; 393 | } 394 | return false; 395 | } 396 | }, 397 | 398 | 'Preact': { 399 | icon: 'preact', 400 | url: 'https://preactjs.com/', 401 | npm: 'preact', 402 | test: function(win) { 403 | var expando = typeof Symbol!='undefined' && Symbol.for && Symbol.for('preactattr'); 404 | function isMatch(node) { 405 | return node._component!=null || node.__preactattr_!=null || expando && node[expando]!=null; 406 | } 407 | function getMatch(node) { 408 | return node!=null && isMatch(node) && node; 409 | } 410 | function nodeFilter(node) { 411 | return isMatch(node) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; 412 | } 413 | var preactRoot = getMatch(document.body) || getMatch(document.body.firstElementChild); 414 | if (!preactRoot) { 415 | preactRoot = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT, nodeFilter).nextNode(); 416 | } 417 | if (preactRoot || win.preact) { 418 | var version = UNKNOWN_VERSION; 419 | if (expando && preactRoot && preactRoot[expando]!=null) { 420 | version = '7'; 421 | } 422 | return { version: version }; 423 | } 424 | return false; 425 | } 426 | }, 427 | 428 | 'Modernizr': { 429 | icon: 'modernizr', 430 | url: 'https://modernizr.com/', 431 | npm: 'modernizr', 432 | test: function(win) { 433 | if (win.Modernizr && win.Modernizr.addTest) { 434 | return { version: win.Modernizr._version || UNKNOWN_VERSION }; 435 | } 436 | return false; 437 | } 438 | }, 439 | 440 | 'Processing.js': { 441 | icon: 'processingjs', 442 | url: 'http://processingjs.org', 443 | npm: 'processing-js', 444 | test: function(win) { 445 | if(win.Processing && win.Processing.box) { 446 | return { version: Processing.version || UNKNOWN_VERSION }; 447 | } 448 | return false; 449 | } 450 | }, 451 | 452 | 'Backbone': { 453 | icon: 'backbone', 454 | url: 'http://backbonejs.org/', 455 | npm: 'backbone', 456 | test: function(win) { 457 | if (win.Backbone && win.Backbone.Model.extend) { 458 | return {version: win.Backbone.VERSION || UNKNOWN_VERSION}; 459 | } 460 | return false; 461 | } 462 | }, 463 | 464 | 'Leaflet': { 465 | icon: 'leaflet', 466 | url: 'http://leafletjs.com', 467 | npm: 'leaflet', 468 | test: function(win) { 469 | // Leaflet 3.1 uses L.Marker and L.VERSION; later versions use L.marker and L.version 470 | if (win.L && win.L.GeoJSON && (win.L.marker || win.L.Marker)) { 471 | return { version: win.L.version || win.L.VERSION || UNKNOWN_VERSION }; 472 | } 473 | return false; 474 | } 475 | }, 476 | 477 | 'Mapbox': { 478 | icon: 'mapbox', 479 | url: 'https://www.mapbox.com/', 480 | npm: 'mapbox-gl', 481 | test: function(win) { 482 | if (win.L && win.L.mapbox && win.L.mapbox.geocoder) { 483 | return { version: win.L.mapbox.VERSION || UNKNOWN_VERSION }; 484 | } 485 | return false; 486 | } 487 | }, 488 | 489 | 'Lo-Dash': { 490 | icon: 'lodash', 491 | url: 'https://lodash.com/', 492 | npm: 'lodash', 493 | test: function(win) { 494 | var _ = typeof (_ = win._) == 'function' && _, 495 | chain = typeof (chain = _ && _.chain) == 'function' && chain, 496 | wrapper = (chain || _ || function() { return {}; })(1); 497 | 498 | if (_ && wrapper.__wrapped__) { 499 | return { version: _.VERSION || UNKNOWN_VERSION }; 500 | } 501 | return false; 502 | } 503 | }, 504 | 505 | 'Underscore': { 506 | icon: 'underscore', 507 | url: 'http://underscorejs.org/', 508 | npm: 'underscore', 509 | test: function(win) { 510 | if (win._ && typeof win._.tap === 'function' && 511 | !d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests['Lo-Dash'].test(win)) { 512 | return {version: win._.VERSION || UNKNOWN_VERSION}; 513 | } 514 | return false; 515 | } 516 | }, 517 | 518 | 'Sammy': { 519 | icon: 'sammy', 520 | url: 'http://sammyjs.org', 521 | test: function(win) { 522 | if (win.Sammy && win.Sammy.Application.curry) { 523 | return {version: win.Sammy.VERSION || UNKNOWN_VERSION}; 524 | } 525 | return false; 526 | } 527 | }, 528 | 529 | 'Rico': { 530 | icon: 'rico', 531 | url: 'http://openrico.sourceforge.net/examples/index.html', 532 | test: function(win) { 533 | if (win.Rico && window.Rico.checkIfComplete) { 534 | return {version: win.Rico.Version || UNKNOWN_VERSION}; 535 | } 536 | return false; 537 | } 538 | }, 539 | 540 | 'MochiKit': { 541 | icon: 'mochikit', 542 | url: 'https://mochi.github.io/mochikit/', 543 | test: function(win) { 544 | if (win.MochiKit && win.MochiKit.Base.module) { 545 | return {version: MochiKit.VERSION || UNKNOWN_VERSION}; 546 | } 547 | return false; 548 | } 549 | }, 550 | 551 | 'gRaphaël': { 552 | icon: 'graphael', 553 | url: 'https://github.com/DmitryBaranovskiy/g.raphael', 554 | test: function(win) { 555 | if (win.Raphael && win.Raphael.fn.g) { 556 | return {version: UNKNOWN_VERSION}; 557 | } 558 | return false; 559 | } 560 | }, 561 | 562 | 'Glow': { 563 | icon: 'glow', 564 | url: 'http://www.bbc.co.uk/glow/', 565 | test: function(win) { 566 | if (win.gloader && win.gloader.getRequests) { 567 | return {version: UNKNOWN_VERSION}; 568 | } 569 | else if (win.glow && win.glow.dom) { 570 | return {version: win.glow.VERSION || UNKNOWN_VERSION}; 571 | } 572 | else if (win.Glow) { 573 | return {version: win.Glow.version || UNKNOWN_VERSION}; 574 | } 575 | return false; 576 | } 577 | }, 578 | 579 | 'Socket.IO': { 580 | icon: 'socketio', // currently has no icon 581 | url: 'https://socket.io/', 582 | npm: 'socket.io', 583 | test: function(win) { 584 | // version 0.6.2 uses only io.Socket; more recent versions also have io.sockets 585 | if (win.io && (win.io.sockets || win.io.Socket)) { 586 | return {version: win.io.version || UNKNOWN_VERSION}; 587 | } 588 | return false; 589 | } 590 | }, 591 | 592 | 'Mustache': { 593 | icon: 'mustache', 594 | url: 'http://mustache.github.io/', 595 | npm: 'mustache', 596 | test: function(win) { 597 | if (win.Mustache && win.Mustache.to_html) { 598 | return {version: win.Mustache.version || UNKNOWN_VERSION}; 599 | } 600 | return false; 601 | } 602 | }, 603 | 604 | 'Fabric.js': { 605 | icon: 'icon38', // currently has no icon 606 | url: 'http://fabricjs.com/', 607 | npm: 'fabric', 608 | test: function(win) { 609 | if (win.fabric && win.fabric.util) { 610 | return {version: win.fabric.version || UNKNOWN_VERSION}; 611 | } 612 | return false; 613 | } 614 | }, 615 | 616 | 'FuseJS': { 617 | icon: 'fusejs', 618 | url: 'http://fusejs.io/', 619 | npm: 'fuse.js', 620 | test: function(win) { 621 | if (win.Fuse) { 622 | return {version: UNKNOWN_VERSION}; 623 | } 624 | return false; 625 | } 626 | }, 627 | 628 | 'Tween.js': { 629 | icon: 'icon38', // currently has no icon 630 | url: 'https://github.com/tweenjs/tween.js', 631 | npm: 'tween.js', 632 | test: function(win) { 633 | if (win.TWEEN && win.TWEEN.Easing) { 634 | return {version: UNKNOWN_VERSION}; 635 | } 636 | return false; 637 | } 638 | }, 639 | 640 | 'SproutCore': { 641 | icon: 'sproutcore', 642 | url: 'http://sproutcore.com/', 643 | test: function(win) { 644 | if (win.SC && win.SC.Application) { 645 | return {version: UNKNOWN_VERSION}; 646 | } 647 | return false; 648 | } 649 | }, 650 | 651 | 'Zepto.js': { 652 | icon: 'zepto', 653 | url: 'http://zeptojs.com', 654 | npm: 'zepto', 655 | test: function(win) { 656 | if (win.Zepto && win.Zepto.fn) { 657 | return {version: UNKNOWN_VERSION}; 658 | } 659 | return false; 660 | } 661 | }, 662 | 663 | 'three.js': { 664 | icon: 'icon38', // currently has no icon 665 | url: 'https://threejs.org/', 666 | npm: 'three', 667 | test: function(win) { 668 | if (win.THREE && win.THREE.REVISION) { 669 | return {version: 'r' + win.THREE.REVISION}; 670 | } 671 | else if (win.THREE) { 672 | return {version: UNKNOWN_VERSION}; 673 | } 674 | return false; 675 | } 676 | }, 677 | 678 | 'PhiloGL': { 679 | icon: 'philogl', 680 | url: 'http://www.senchalabs.org/philogl/', 681 | npm: 'philogl', 682 | test: function(win) { 683 | if (win.PhiloGL && win.PhiloGL.Camera) { 684 | return {version: win.PhiloGL.version || UNKNOWN_VERSION}; 685 | } 686 | return false; 687 | } 688 | }, 689 | 690 | 'CamanJS': { 691 | icon: 'camanjs', 692 | url: 'http://camanjs.com/', 693 | npm: 'caman', 694 | test: function(win) { 695 | if (win.Caman && win.Caman.version) { 696 | return {version: win.Caman.version.release}; 697 | } 698 | else if (win.Caman) { 699 | return {version: UNKNOWN_VERSION}; 700 | } 701 | return false; 702 | } 703 | }, 704 | 705 | 'yepnope': { 706 | icon: 'yepnope', 707 | url: 'http://yepnopejs.com/', 708 | test: function(win) { 709 | if (win.yepnope && win.yepnope.injectJs) { 710 | return {version: UNKNOWN_VERSION}; 711 | } 712 | return false; 713 | } 714 | }, 715 | 716 | 'LABjs': { 717 | icon: 'icon38', 718 | url: 'https://github.com/getify/LABjs', 719 | test: function(win) { 720 | if (win.$LAB && win.$LAB.setOptions) { 721 | return {version: UNKNOWN_VERSION}; 722 | } 723 | return false; 724 | } 725 | }, 726 | 727 | 'Head JS': { 728 | icon: 'headjs', 729 | url: 'http://headjs.com/', 730 | npm: 'headjs', 731 | test: function(win) { 732 | if (win.head && win.head.js) { 733 | return {version: UNKNOWN_VERSION}; 734 | } 735 | return false; 736 | } 737 | }, 738 | 739 | 'ControlJS': { 740 | icon: 'icon38', 741 | url: 'http://stevesouders.com/controljs/', 742 | test: function(win) { 743 | if (win.CJS && win.CJS.start) { 744 | return {version: UNKNOWN_VERSION}; 745 | } 746 | return false; 747 | } 748 | }, 749 | 750 | 'RequireJS': { 751 | icon: 'requirejs', 752 | url: 'http://requirejs.org/', 753 | npm: 'requirejs', 754 | test: function(win) { 755 | var req = win.require || win.requirejs; 756 | if (req && (req.load || (req.s && req.s.contexts && req.s.contexts._ && (req.s.contexts._.loaded || req.s.contexts._.load)))) { 757 | return { version: req.version || UNKNOWN_VERSION }; 758 | } 759 | return false; 760 | } 761 | }, 762 | 763 | 'RightJS': { 764 | icon: 'rightjs', 765 | url: 'http://rightjs.org/', 766 | test: function(win) { 767 | if (win.RightJS && win.RightJS.isNode) { 768 | return { version: win.RightJS.version || UNKNOWN_VERSION }; 769 | } 770 | return false; 771 | } 772 | }, 773 | 774 | 'jQuery Tools': { 775 | icon: 'jquerytools', 776 | url: 'http://jquerytools.github.io/', 777 | test: function(win) { 778 | var jq = win.jQuery || win.$; 779 | if(jq && jq.tools) { 780 | return { version: jq.tools.version || UNKNOWN_VERSION }; 781 | } 782 | return false; 783 | } 784 | }, 785 | 786 | 'Pusher': { 787 | icon: 'pusher', 788 | url: 'https://pusher.com/docs/', 789 | npm: 'pusher-js', 790 | test: function(win) { 791 | if(win.Pusher && win.Pusher.Channel) { 792 | return { version: win.Pusher.VERSION || UNKNOWN_VERSION }; 793 | } 794 | return false; 795 | } 796 | }, 797 | 798 | 'Paper.js': { 799 | icon: 'paperjs', 800 | url: 'http://paperjs.org/', 801 | npm: 'paper', 802 | test: function(win) { 803 | if(win.paper && win.paper.Point) { 804 | return { version: win.paper.version || UNKNOWN_VERSION }; 805 | } 806 | return false; 807 | } 808 | }, 809 | 810 | 'Swiffy': { 811 | icon: 'icon38', 812 | url: 'https://developers.google.com/swiffy/', 813 | test: function(win) { 814 | if(win.swiffy && win.swiffy.Stage) { 815 | return { version: UNKNOWN_VERSION }; 816 | } 817 | return false; 818 | } 819 | }, 820 | 821 | 'Move': { 822 | icon: 'move', 823 | url: 'https://github.com/rsms/move', 824 | npm: 'move', 825 | test: function(win) { 826 | if(win.move && win.move.compile) { 827 | return { version: win.move.version() || UNKNOWN_VERSION }; 828 | } 829 | return false; 830 | } 831 | }, 832 | 833 | 'AmplifyJS': { 834 | icon: 'amplifyjs', 835 | url: 'http://amplifyjs.com/', 836 | npm: 'amplifyjs', 837 | test: function(win) { 838 | if(win.amplify && win.amplify.publish) { 839 | return { version: UNKNOWN_VERSION }; 840 | } 841 | return false; 842 | } 843 | }, 844 | 845 | 'Popcorn.js': { 846 | icon: 'popcornjs', 847 | url: 'https://github.com/mozilla/popcorn-js/', 848 | test: function(win) { 849 | if (win.Popcorn && win.Popcorn.Events) { 850 | return { version: win.Popcorn.version || UNKNOWN_VERSION }; 851 | } 852 | return false; 853 | } 854 | }, 855 | 856 | 'D3': { 857 | icon: 'd3', 858 | url: 'https://d3js.org/', 859 | npm: 'd3', 860 | test: function(win) { 861 | if (win.d3 && win.d3.select) { 862 | return { version: win.d3.version || UNKNOWN_VERSION }; 863 | } 864 | return false; 865 | } 866 | }, 867 | 868 | 'Handlebars': { 869 | icon: 'handlebars', 870 | url: 'http://handlebarsjs.com/', 871 | npm: 'handlebars', 872 | test: function(win) { 873 | if(win.Handlebars && win.Handlebars.compile) { 874 | return { version: win.Handlebars.VERSION || UNKNOWN_VERSION }; 875 | } 876 | return false; 877 | } 878 | }, 879 | 880 | 'Knockout': { 881 | icon: 'knockout', 882 | url: 'http://knockoutjs.com/', 883 | npm: 'knockout', 884 | test: function(win) { 885 | if (win.ko && win.ko.applyBindings) { 886 | return { version: win.ko.version || UNKNOWN_VERSION }; 887 | } 888 | return false; 889 | } 890 | }, 891 | 892 | 'Spine': { 893 | icon: 'icon38', 894 | url: 'http://spine.github.io/', 895 | test: function(win) { 896 | if (win.Spine && win.Spine.Controller) { 897 | return {version: win.Spine.version || UNKNOWN_VERSION}; 898 | } 899 | return false; 900 | } 901 | }, 902 | 903 | 'jQuery Mobile': { 904 | icon: 'jquery_mobile', 905 | url: 'http://jquerymobile.com/', 906 | npm: 'jquery-mobile', 907 | test: function(win) { 908 | var jq = win.jQuery || win.$ || win.$jq || win.$j; 909 | if(jq && jq.fn && jq.fn.jquery && jq.mobile) { 910 | return { version: jq.mobile.version || UNKNOWN_VERSION }; 911 | } 912 | return false; 913 | } 914 | }, 915 | 916 | 'WebFont Loader': { 917 | icon: 'icon38', 918 | url: 'https://github.com/typekit/webfontloader', 919 | npm: 'webfontloader', 920 | test: function(win) { 921 | if(win.WebFont && win.WebFont.load) { 922 | return { version: UNKNOWN_VERSION }; 923 | } 924 | return false; 925 | } 926 | }, 927 | 928 | 'Angular': { 929 | icon: 'angular', 930 | url: 'https://angular.io/', 931 | npm: '@angular/core', 932 | test: function(win) { 933 | var ngVersion = win.document.querySelector('[ng-version]'); 934 | if (ngVersion) { 935 | return { version: ngVersion.getAttribute('ng-version') || UNKNOWN_VERSION }; 936 | } 937 | else if (win.ng && win.ng.probe instanceof Function) { 938 | return { version: UNKNOWN_VERSION }; 939 | } 940 | return false; 941 | } 942 | }, 943 | 944 | 'AngularJS': { 945 | icon: 'angularjs', 946 | url: 'https://angularjs.org/', 947 | npm: 'angular', 948 | test: function(win) { 949 | var ng = win.angular; 950 | if(ng && ng.version && ng.version.full) { 951 | return { version: ng.version.full }; 952 | } 953 | else if (ng) { 954 | return { version: UNKNOWN_VERSION }; 955 | } 956 | return false; 957 | } 958 | }, 959 | 960 | 'Ember.js': { 961 | icon: 'emberjs', 962 | url: 'https://emberjs.com/', 963 | npm: 'ember-source', 964 | test: function(win) { 965 | var ember = win.Ember || win.Em; 966 | if (ember && ember.propertyDidChange) { 967 | return { version: ember.VERSION || UNKNOWN_VERSION }; 968 | } 969 | return false; 970 | } 971 | }, 972 | 973 | 'Hammer.js': { 974 | icon: 'hammerjs', 975 | url: 'http://eightmedia.github.io/hammer.js/', 976 | npm: 'hammerjs', 977 | test: function(win) { 978 | if(win.Hammer && win.Hammer.Pinch) { 979 | // Hammer.VERSION available in 1.0.10+ 980 | return { version: win.Hammer.VERSION || "< 1.0.10" }; 981 | } 982 | return false; 983 | } 984 | }, 985 | 986 | 'Visibility.js': { 987 | icon: 'icon38', 988 | url: 'https://github.com/ai/visibilityjs', 989 | npm: 'visibilityjs', 990 | test: function(win) { 991 | if(win.Visibility && win.Visibility.every) { 992 | return { version: UNKNOWN_VERSION }; 993 | } 994 | return false; 995 | } 996 | }, 997 | 998 | 'Velocity.js': { 999 | icon: 'icon38', 1000 | url: 'http://velocityjs.org/', 1001 | npm: 'velocity-animate', 1002 | test: function(win) { 1003 | var jq = win.jQuery || win.$, 1004 | velocity = jq ? jq.Velocity : win.Velocity; 1005 | 1006 | if(velocity && velocity.RegisterEffect && velocity.version) { 1007 | return { 1008 | version: 1009 | velocity.version.major + "." + 1010 | velocity.version.minor + "." + 1011 | velocity.version.patch 1012 | }; 1013 | } 1014 | else if (velocity && velocity.RegisterEffect) { 1015 | return { version: UNKNOWN_VERSION }; 1016 | } 1017 | return false; 1018 | } 1019 | }, 1020 | 1021 | 'IfVisible.js': { 1022 | icon: 'icon38', 1023 | url: 'http://serkanyersen.github.io/ifvisible.js/', 1024 | npm: 'ifvisible.js', 1025 | test: function(win) { 1026 | var iv = win.ifvisible; 1027 | if(iv && iv.__ceGUID === "ifvisible.object.event.identifier") { 1028 | return { version: UNKNOWN_VERSION }; 1029 | } 1030 | return false; 1031 | } 1032 | }, 1033 | 'Pixi.js': { 1034 | icon: 'pixi', 1035 | url: 'http://www.pixijs.com/', 1036 | npm: 'pixi.js', 1037 | test: function(win) { 1038 | var px = win.PIXI; 1039 | if(px && px.WebGLRenderer && px.VERSION) { 1040 | // version 4.4.3 returns simply "4.4.3"; version 1.5.2 returns "v1.5.2" 1041 | return { version: px.VERSION.replace('v', '') || UNKNOWN_VERSION }; 1042 | } 1043 | return false; 1044 | } 1045 | }, 1046 | 'DC.js': { 1047 | icon: 'dcjs', 1048 | url: 'http://dc-js.github.io/dc.js/', 1049 | npm: 'dc', 1050 | test: function(win) { 1051 | var dc = win.dc; 1052 | if(dc && dc.registerChart) { 1053 | return { version: dc.version || UNKNOWN_VERSION }; 1054 | } 1055 | return false; 1056 | } 1057 | }, 1058 | 'GreenSock JS': { 1059 | icon: 'greensock', 1060 | url: 'https://greensock.com/gsap', 1061 | npm: 'gsap', 1062 | test: function(win) { 1063 | if (win.TweenMax && win.TweenMax.pauseAll) { 1064 | return { version: win.TweenMax.version || UNKNOWN_VERSION }; 1065 | } 1066 | return false; 1067 | } 1068 | }, 1069 | 'FastClick': { 1070 | icon: 'fastclick', 1071 | url: 'https://github.com/ftlabs/fastclick', 1072 | npm: 'fastclick', 1073 | test: function(win) { 1074 | if(win.FastClick && win.FastClick.notNeeded) { 1075 | return { version: UNKNOWN_VERSION }; 1076 | } 1077 | return false; 1078 | } 1079 | }, 1080 | 'Isotope': { 1081 | icon: 'isotope', 1082 | url: 'https://isotope.metafizzy.co/', 1083 | npm: 'isotope-layout', 1084 | test: function(win) { 1085 | if(win.Isotope || (win.$ != null && win.$.Isotope)) { 1086 | return { version: UNKNOWN_VERSION }; 1087 | } 1088 | return false; 1089 | } 1090 | }, 1091 | 'Marionette': { 1092 | icon: 'marionette', 1093 | url: 'https://marionettejs.com/', 1094 | npm: 'backbone.marionette', 1095 | test: function(win) { 1096 | if(win.Marionette && win.Marionette.Application) { 1097 | return { version: win.Marionette.VERSION || UNKNOWN_VERSION }; 1098 | } 1099 | return false; 1100 | } 1101 | }, 1102 | 'Can': { 1103 | icon: 'canjs', 1104 | url: 'https://canjs.com/', 1105 | npm: 'can', 1106 | test: function (win) { 1107 | if (win.can && win.can.Construct) { 1108 | return { version: win.can.VERSION || UNKNOWN_VERSION }; 1109 | } 1110 | return false; 1111 | } 1112 | }, 1113 | 'Vue': { 1114 | icon: 'vue', 1115 | url: 'https://vuejs.org/', 1116 | npm: 'vue', 1117 | test: function(win) { 1118 | function isVueNode(node) { 1119 | return node.__vue__ != null ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; 1120 | } 1121 | var hasVueNode = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT, isVueNode).nextNode() !== null; 1122 | if (hasVueNode) { 1123 | return { version: win.Vue && win.Vue.version || UNKNOWN_VERSION } 1124 | } 1125 | return false; 1126 | } 1127 | }, 1128 | 'Nuxt.js': { 1129 | icon: 'nuxt', 1130 | url: 'https://nuxtjs.org/', 1131 | npm: 'nuxt', 1132 | test: function(win) { 1133 | if ((win.__NUXT__ && win.__NUXT__.data != null) || win.$nuxt) { 1134 | return { version: UNKNOWN_VERSION }; 1135 | } 1136 | return false; 1137 | } 1138 | }, 1139 | 'Two': { 1140 | icon: 'two', 1141 | url: 'https://two.js.org/', 1142 | npm: 'two.js', 1143 | test: function(win) { 1144 | if (win.Two && win.Two.Utils) { 1145 | return { version: win.Two.Version || UNKNOWN_VERSION }; 1146 | } 1147 | return false; 1148 | } 1149 | }, 1150 | 'Brewser': { 1151 | icon: 'brewser', 1152 | url: 'https://robertpataki.github.io/brewser/', 1153 | npm: 'brewser', 1154 | test: function(win) { 1155 | if(win.BREWSER && win.BREWSER.ua) { 1156 | return { version: BREWSER.VERSION || UNKNOWN_VERSION }; 1157 | } 1158 | return false; 1159 | } 1160 | }, 1161 | 'Material Design Lite': { 1162 | icon: 'mdl', 1163 | url: 'https://getmdl.io/', 1164 | npm: 'material-design-lite', 1165 | test: function(win) { 1166 | if(win.componentHandler && win.componentHandler.upgradeElement) { 1167 | return { version: UNKNOWN_VERSION}; 1168 | } 1169 | return false; 1170 | } 1171 | }, 1172 | 'Kendo UI': { 1173 | icon: 'kendoui', 1174 | url: 'https://github.com/telerik/kendo-ui-core', 1175 | npm: 'kendo-ui-core', 1176 | test: function(win) { 1177 | if (win.kendo && win.kendo.View && win.kendo.View.extend) { 1178 | return {version: win.kendo.version || UNKNOWN_VERSION}; 1179 | } 1180 | return false; 1181 | } 1182 | }, 1183 | 'Matter.js': { 1184 | icon: 'matter-js', 1185 | url: 'http://brm.io/matter-js/', 1186 | npm: 'matter-js', 1187 | test: function(win) { 1188 | if (win.Matter && win.Matter.Engine) { 1189 | return {version: UNKNOWN_VERSION}; 1190 | } 1191 | return false; 1192 | } 1193 | }, 1194 | 'Riot': { 1195 | icon: 'riot', 1196 | url: 'http://riotjs.com/', 1197 | npm: 'riot', 1198 | test: function(win) { 1199 | if (win.riot && win.riot.mixin) { 1200 | return { version: win.riot.version || UNKNOWN_VERSION }; 1201 | } 1202 | return false; 1203 | } 1204 | }, 1205 | 'Sea.js': { 1206 | icon: 'icon38', 1207 | url: 'https://seajs.github.io/seajs/docs/', 1208 | npm: 'seajs', 1209 | test: function(win) { 1210 | if(win.seajs && win.seajs.use) { 1211 | return { version: win.seajs.version || UNKNOWN_VERSION }; 1212 | } 1213 | return false; 1214 | } 1215 | }, 1216 | 'Moment.js': { 1217 | icon: 'momentjs', 1218 | url: 'http://momentjs.com/', 1219 | npm: 'moment', 1220 | test: function(win) { 1221 | if(win.moment && (win.moment.isMoment || win.moment.lang)) { 1222 | // version 1.0.0 has neither "isMoment" nor "version" 1223 | return { version: win.moment.version || UNKNOWN_VERSION }; 1224 | } 1225 | return false; 1226 | } 1227 | }, 1228 | 'Moment Timezone': { 1229 | icon: 'momentjs', 1230 | url: 'http://momentjs.com/timezone/', 1231 | npm: 'moment-timezone', 1232 | test: function(win) { 1233 | if (win.moment && win.moment.tz) { 1234 | return { version: win.moment.tz.version || UNKNOWN_VERSION }; 1235 | } 1236 | return false; 1237 | } 1238 | }, 1239 | 'ScrollMagic': { 1240 | icon: 'scrollmagic', 1241 | url: 'http://scrollmagic.io/', 1242 | npm: 'scrollmagic', 1243 | test: function(win) { 1244 | if (win.ScrollMagic && win.ScrollMagic.Controller) { 1245 | return {version: ScrollMagic.version || UNKNOWN_VERSION}; 1246 | } 1247 | return false; 1248 | } 1249 | }, 1250 | 'SWFObject': { 1251 | icon: 'icon38', // currently has no icon 1252 | url: 'https://github.com/swfobject/swfobject', 1253 | test: function(win) { 1254 | if (win.swfobject && win.swfobject.embedSWF) { 1255 | // 2.x - exact version only for 2.3 1256 | return { version: win.swfobject.version || UNKNOWN_VERSION }; 1257 | } else if(win.deconcept && win.deconcept.SWFObject) { 1258 | // 1.x 1259 | return { version: UNKNOWN_VERSION }; 1260 | } 1261 | return false; 1262 | } 1263 | }, 1264 | 'FlexSlider': { 1265 | icon: 'icon38', // currently has no icon 1266 | url: 'https://woocommerce.com/flexslider/', 1267 | npm: 'flexslider', 1268 | test: function(win) { 1269 | var jq = win.jQuery || win.$ || win.$jq || win.$j; 1270 | if (jq && jq.fn && jq.fn.jquery && jq.flexslider){ 1271 | return { version: UNKNOWN_VERSION }; 1272 | } 1273 | return false; 1274 | } 1275 | }, 1276 | 'SPF': { 1277 | icon: 'icon38', // currently has no icon 1278 | url: 'https://youtube.github.io/spfjs/', 1279 | npm: 'spf', 1280 | test: function(win) { 1281 | if (win.spf && win.spf.init) { 1282 | return { version: UNKNOWN_VERSION }; 1283 | } 1284 | return false; 1285 | } 1286 | }, 1287 | 'Numeral.js': { 1288 | icon: 'icon38', // currently has no icon 1289 | url: 'http://numeraljs.com/', 1290 | npm: 'numeraljs', 1291 | test: function(win) { 1292 | if (win.numeral && win.isNumeral) { 1293 | return { version: win.numeral.version || UNKNOWN_VERSION }; 1294 | } 1295 | return false; 1296 | } 1297 | }, 1298 | 'boomerang.js': { 1299 | icon: 'icon38', // currently has no icon 1300 | url: 'https://soasta.github.io/boomerang/', 1301 | npm: 'boomerangjs', 1302 | test: function(win) { 1303 | if (win.BOOMR && win.BOOMR.utils && win.BOOMR.init) { 1304 | return { version: win.BOOMR.version || UNKNOWN_VERSION }; 1305 | } 1306 | return false; 1307 | } 1308 | }, 1309 | 'Framer': { 1310 | icon: 'framer', 1311 | url: 'https://framer.com/', 1312 | npm: 'framerjs', 1313 | test: function(win) { 1314 | if (win.Framer && win.Framer.Layer) { 1315 | return { version: win.Framer.Version.build || UNKNOWN_VERSION }; 1316 | } 1317 | return false; 1318 | } 1319 | }, 1320 | 'Marko': { 1321 | icon: 'marko', 1322 | url: 'https://markojs.com/', 1323 | npm: 'marko', 1324 | test: function (win) { 1325 | var selector = '[data-marko-key], [data-marko]'; 1326 | var markoElement = document.querySelector(selector); 1327 | if (markoElement) { 1328 | return { version: UNKNOWN_VERSION }; 1329 | } 1330 | return false; 1331 | } 1332 | }, 1333 | 'AMP': { 1334 | icon: 'amp', 1335 | url: 'https://ampproject.org/', 1336 | npm: null, 1337 | test: function (win) { 1338 | var version = win.document.documentElement.getAttribute("amp-version"); 1339 | return version ? { version: version } : false; 1340 | } 1341 | }, 1342 | 'Gatsby': { 1343 | icon: 'gatsby', 1344 | url: 'https://www.gatsbyjs.org/', 1345 | npm: 'gatsby', 1346 | test: function (win) { 1347 | if (document.getElementById('___gatsby')) { 1348 | return { version: UNKNOWN_VERSION }; 1349 | } 1350 | return false; 1351 | } 1352 | }, 1353 | 'Shopify': { 1354 | icon: 'shopify', 1355 | url: 'https://www.shopify.com/', 1356 | npm: null, 1357 | test: function (win) { 1358 | if (win.Shopify && win.Shopify.shop) { 1359 | return { version: UNKNOWN_VERSION }; 1360 | } 1361 | return false; 1362 | } 1363 | }, 1364 | 'WordPress': { 1365 | icon: 'wordpress', 1366 | url: 'https://wordpress.org/', 1367 | npm: null, 1368 | test: function (win) { 1369 | const hasAPILinkElem = !!document.querySelector('link[rel="https://api.w.org/"]'); 1370 | const hasWPIncludes = !!document.querySelectorAll('link[href*="wp-includes"], script[src*="wp-includes"]').length; 1371 | 1372 | if (!hasAPILinkElem && !hasWPIncludes) return false; 1373 | 1374 | const generatorMeta = document.querySelector('meta[name=generator][content^="WordPress"]') 1375 | const version = generatorMeta ? generatorMeta.getAttribute("content").replace(/^\w+\s/,'') : UNKNOWN_VERSION; 1376 | return { version }; 1377 | } 1378 | }, 1379 | 'Wix': { 1380 | icon: 'wix', 1381 | url: 'https://www.wix.com/', 1382 | npm: null, 1383 | test: function (win) { 1384 | if (win.wixBiSession) { 1385 | return { version: UNKNOWN_VERSION }; 1386 | } 1387 | return false; 1388 | } 1389 | }, 1390 | 'Workbox': { 1391 | icon: 'workbox', 1392 | url: 'https://developers.google.com/web/tools/workbox/', 1393 | npm: 'workbox-sw', 1394 | test: async function (win) { 1395 | var nav = win.navigator; 1396 | // Service Workers not supported 1397 | if (!('serviceWorker' in nav)) { 1398 | return false; 1399 | } 1400 | return nav.serviceWorker.getRegistration() 1401 | .then(function(registration) { 1402 | var scriptURL = nav.serviceWorker.controller.scriptURL; 1403 | return fetch(scriptURL, { credentials: 'include', 1404 | headers: { 'service-worker': 'script' } 1405 | }) 1406 | .then(function(response) { 1407 | return response.text(); 1408 | }) 1409 | .then(function(scriptContent) { 1410 | var workboxRegExp = /new Workbox|new workbox|workbox\.precaching\.|workbox\.strategies/gm; 1411 | if (workboxRegExp.test(scriptContent)) { 1412 | // Adapted from 1413 | // https://github.com/semver/semver/issues/232#issue-48635632 1414 | var semVerRegExp = /workbox.*?\b((0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?)\b/gim; 1415 | var matches = semVerRegExp.exec(scriptContent); 1416 | var version = UNKNOWN_VERSION; 1417 | if (Array.isArray(matches) && matches.length > 1 && matches[1]) { 1418 | version = matches[1]; 1419 | } 1420 | return { version: version }; 1421 | } 1422 | return false; 1423 | }); 1424 | }).catch(function(exception) { 1425 | return false; 1426 | }); 1427 | } 1428 | } 1429 | }; 1430 | --------------------------------------------------------------------------------