User:Gerbrant/gui/taskbar.js
From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Firefox/Mozilla/Safari: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Internet Explorer: press Ctrl-F5, Opera/Konqueror: press F5.
document.write("\ <style>\ #gerbrant-taskbar\ {\ position:absolute;\ z-index:256;\ left:0;top:0;width:100%;\ padding:2px 0 2px;\ border-bottom:1px solid #888;\ background:#eee;\ display:none;\ }\ .gerbrant-taskbarbutton\ {\ margin:0 0.5em 0;\ border:1px solid #88f;\ background:#ddf;\ color:#000;\ }\ </style>"); module("Gerbrant.gui.taskbar", new function() { var s; var divTaskbar = document.createElement("DIV"); divTaskbar.id = "gerbrant-taskbar"; this.addWindow = function(w) { var a = document.createElement("A"); a.className = "gerbrant-taskbarbutton"; a.innerHTML = w.getCaption(); a.onclick = function() { w.setVisible(!w.getVisible()); } divTaskbar.appendChild(a); divTaskbar.style.display = "block"; }; hookEvent("load", function() { document.body.insertBefore(divTaskbar, document.body.firstChild); }); });