User:Spaully/monobook.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.
/** /* This function is used to include scripts from other Wikipedia pages in mine. I got it from [[User:Quarl/monobook.js]]. */ function winc(s) { s = s.replace(/^\[\[/, '').replace(/\]\]$/, ''); document.write('<scr' + 'ipt type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=' + s + '&action=raw&ctype=text/javascript&dontcountme=s"></scr' + 'ipt>'); } /* Included functions */ winc('[[User:Omegatron/monobook.js/addlink.js]]'); /* Adds links to lists on the page, such as the personal tools section */ winc('[[User:Omegatron/monobook.js/fixdiffwidth.js]]'); /* Cleans up the diff so that long lines don't explode the width of the page. */ winc('[[User:Omegatron/monobook.js/edittop.js]]'); /* Adds a link to edit the top (intro) section of an article */ // [[User:Lupin/popups.js]] document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); popupFixRedirs=true; popupFixDabs=true; popupStructure='menus'; popupMaxPreviewCharacters=1000; // Script from [[User:Lupin/recent2.js]] document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/recent2.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); /* Move top tabs inside body content */ addOnloadHook(function () { content = document.getElementById("column-content"); // Find the main content column footer = document.getElementById("footer"); // Find the footer footer.parentNode.removeChild(footer); // Remove the footer from the global wrapper content.appendChild(footer); // Place footer at the end of the content column; tabs = document.getElementById("p-cactions"); // Find the top tab list tabs.parentNode.removeChild(tabs); // Remove the tab list from the side column content.insertBefore(tabs,content.firstChild); // Place tab list at the beginning of the content column }); /* Bottom links */ function morelinks() { var tabs = document.getElementById('p-cactions').cloneNode(true); tabs.id = 'mytabs'; var listitems = tabs.getElementsByTagName('LI'); for (i=0;i<listitems.length;i++) { if(listitems[i].id) listitems[i].id = 'mytabs-' + listitems[i].id; } document.getElementById('column-content').appendChild(tabs); } if (window.addEventListener) window.addEventListener("load",morelinks,false); else if (window.attachEvent) window.attachEvent("onload",morelinks); //Interiot's javascript edit counter if (document.title.indexOf('User:Interiot/Tool2/code.js') != -1) { document.write('<script type="text/javascript" src="' + 'http://en.wikipedia.org/w/index.php?title=User:Interiot/Tool2/code.js' + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); } **/