mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-06-06 08:29:08 +00:00
51 lines
1.6 KiB
HTML
Executable File
51 lines
1.6 KiB
HTML
Executable File
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
|
<title>Library detector</title>
|
|
<style type="text/css" media="all">
|
|
img {
|
|
display: inline;
|
|
width: 16px;
|
|
height: 16px;
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
var icons = {
|
|
'jQuery' : 'jquery.ico',
|
|
'jQuery UI' : 'jquery_ui.ico',
|
|
'MooTools' : 'mootools.png',
|
|
'YUI' : 'yui.ico',
|
|
'Closure' : 'closure.ico',
|
|
'Modernizr': 'modernizr.ico',
|
|
};
|
|
|
|
// Listen for mouse events over icons, in order to send a message up to
|
|
// the panel and update its content with library name and version
|
|
window.addEventListener('mouseover', function (event) {
|
|
if (event.target.tagName == 'IMG') {
|
|
addon.port.emit('setLibraryInfo', event.target.title);
|
|
}
|
|
}, false);
|
|
|
|
addon.port.on('update', function (libraries) {
|
|
// Cleanup previous content
|
|
document.body.innerHTML = '';
|
|
|
|
// Create new updated list of icons
|
|
libraries.forEach(function(library) {
|
|
var img = document.createElement('img');
|
|
img.setAttribute('src', 'icons/' + icons[library.name]);
|
|
img.setAttribute('title', library.name + "<br>Version: " +
|
|
library.version);
|
|
document.body.appendChild(img);
|
|
});
|
|
});
|
|
</script>
|
|
</head>
|
|
<body></body>
|
|
</html>
|