Skip to content

Commit

Permalink
Merged in some new libraries added by @johnmichel, fixed a spacing is…
Browse files Browse the repository at this point in the history
…sue when displaying the version number
  • Loading branch information
andrewbredow committed Aug 6, 2011
2 parents b797684 + 44ff179 commit d1069f7
Show file tree
Hide file tree
Showing 13 changed files with 122 additions and 26 deletions.
1 change: 0 additions & 1 deletion background_scripts/main.js
Expand Up @@ -120,7 +120,6 @@ function getIcon(iconName, count) {
context.textBaseline = 'bottom';
context.textAlign = 'right';
context.fillText(count, 15.75, 16);

}
dispatch(context.getImageData(0, 0, 16, 16));
}, false);
Expand Down
Binary file added icons/camanjs.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/headjs.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/philogl.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/pusher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/raphael.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/requirejs.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/rightjs.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/typekit.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/yepnope.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
137 changes: 118 additions & 19 deletions library/libraries.js
Expand Up @@ -110,6 +110,9 @@ var d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests = {
if(win.Ext && win.Ext.version) {
return { version: win.Ext.version };
}
else if (win.Ext && window.Ext.versions) {
return { version: window.Ext.versions.core.version };
}
return false;
}
},
Expand All @@ -125,18 +128,18 @@ var d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests = {
}
},

'Closure': {
'Closure Library': {
icon: 'closure',
url: 'http://code.google.com/closure',
url: 'http://code.google.com/closure/library',
test: function(win) {
if(win.goog) {
return { version: '2.0' };
return { version: 'none' };
}
return false;
}
},

'Raphaël': {
'Raphaël': {
icon: 'raphael',
url: 'http://raphaeljs.com',
test: function(win) {
Expand Down Expand Up @@ -169,7 +172,7 @@ var d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests = {
}
},

'Backbone.js': {
'Backbone': {
icon: 'backbone',
url: 'http://documentcloud.github.com/backbone',
test: function(win) {
Expand All @@ -180,7 +183,7 @@ var d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests = {
}
},

'Underscore.js': {
'Underscore': {
icon: 'underscore',
url: 'http://documentcloud.github.com/underscore',
test: function(win) {
Expand All @@ -192,7 +195,7 @@ var d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests = {
}
},

'Sammy.js': {
'Sammy': {
icon: 'sammy',
url: 'http://sammyjs.org',
test: function(win) {
Expand Down Expand Up @@ -225,7 +228,7 @@ var d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests = {
}
},

'gRaphaël': {
'gRaphaël': {
icon: 'graphael',
url: 'http://g.raphaeljs.com',
test: function(win) {
Expand All @@ -243,7 +246,7 @@ var d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests = {
if (win.gloader) {
return {version: 'none'};
}
else if (win.glow) {
else if (win.glow && win.glow.dom) {
return {version: win.glow.VERSION};
}
else if (win.Glow) {
Expand All @@ -257,14 +260,14 @@ var d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests = {
icon: 'icon_48', // currently has no icon
url: 'http://socket.io',
test: function(win) {
if (win.io && win.io.sockets && win.io.version) { // fix! e.g. Google Reader currently shows up as using socket.io, which they are not doing
if (win.io && win.io.on) {
return {version: win.io.version};
}
return false;
}
},

'Mustache.js': {
'Mustache': {
icon: 'mustache',
url: 'http://mustache.github.com',
test: function(win) {
Expand Down Expand Up @@ -313,7 +316,7 @@ var d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests = {
icon: 'sproutcore',
url: 'http://www.sproutcore.com',
test: function(win) {
if (win.SC && win.SC.bundleDidLoad) {
if (win.SC && win.SC.Application) {
return {version: 'none'};
}
return false;
Expand All @@ -340,21 +343,117 @@ var d41d8cd98f00b204e9800998ecf8427e_LibraryDetectorTests = {
}
return false;
}
}/*,
},

'PhiloGL': {
icon: 'philogl',
url: 'http://senchalabs.github.com/philogl',
test: function(win) {
if (win.PhiloGL) {
return {version: win.PhiloGL.version};
}
return false;
}
},

'CamanJS': {
icon: 'camanjs',
url: 'http://camanjs.com',
test: function(win) {
if (win.Caman) {
return {version: 'none'};
}
return false;
}
},

'yepnope': {
icon: 'yepnope',
url: 'http://yepnopejs.com/',
test: function(win) {
if (win.yepnope) {
return {version: 'none'};
}
return false;
}
},

'LABjs': {
icon: 'icon_48',
url: 'http://labjs.com/',
test: function(win) {
if (win.$LAB) {
return {version: 'none'};
}
return false;
}
},

'Head JS': {
icon: 'headjs',
url: 'http://headjs.com/',
test: function(win) {
if (win.head && win.head.js) {
return {version: 'none'};
}
return false;
}
},

'ControlJS': {
icon: 'icon_48',
url: 'http://stevesouders.com/controljs/',
test: function(win) {
if (win.CJS) {
return {version: 'none'};
}
return false;
}
},

'RequireJS': {
icon: 'requirejs',
url: 'http://requirejs.org/',
test: function(win) {
if (win.require && win.require.version) {
return {version: win.require.version};
}
return false;
}
},

'RightJS': {
icon: 'rightjs',
url: 'http://rightjs.org/',
test: function(win) {
if (win.RightJS) {
return {version: win.RightJS.version};
}
return false;
}
},

'jQuery Tools': {
icon: 'jquerytools',
url: 'http://flowplayer.org/tools',
test: function(win) {
var jq = win.jQuery || win.$ || win.$jq || win.$j;
if(jq && jq.fn && jq.fn.jquery && win.$.tools) {
//if ((win.$ || win.jQuery) && win.$.tools) {
return {version: $.tools.version};
var jq = win.jQuery || win.$;
if(jq && win.$.tools) {
return { version: $.tools.version };
}
return false;
}
},

'Pusher': {
icon: 'pusher',
url: 'http://pusher.com/docs/pusher_js',
test: function(win) {
if(win.Pusher) {
return { version: win.Pusher.VERSION };
}
return false;
}
}
*/
// maybe include some of the other javascript loaders? - http://jhn.me/7aeW
};
8 changes: 3 additions & 5 deletions popups/libraries.html
Expand Up @@ -3,7 +3,7 @@
-->
<html>
<head>
<script type="text/javascript" src="libraries.js"></script>
<script src="libraries.js"></script>
<style type="text/css">
body {
font-family: sans-serif;
Expand All @@ -16,11 +16,9 @@
line-height: 18px;
white-space: nowrap;
}
a,
a:link,
a:visited {
a, a:link, a:visited {
color: inherit;
background-size: 16px, 16px;
background-size: 14px, 15px;
padding-left: 20px;
text-decoration: none;
}
Expand Down
2 changes: 1 addition & 1 deletion popups/libraries.js
Expand Up @@ -13,7 +13,7 @@ var addLibrary = function(library) {
link.target = '_blank';

var version = document.createElement('span');
version.innerHTML = library.version !== 'none' ? library.version : '';
version.innerHTML = library.version !== 'none' ? (' ' + library.version) : '';

container.appendChild(link);
container.appendChild(version);
Expand Down

0 comments on commit d1069f7

Please sign in to comment.