User:Jossi/monobook.js

From Wikisource
Jump to: navigation, search

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Konqueror: Click Reload or press F5
  • Opera: Clear the cache in Tools → Preferences
/* [[Category:Bots/Script files to update]] <pre><nowiki>*/
 
 
/* hide wikipedia links */
 function hideextiw() {
    var i = 0;
    var k = document.links.length;
    for (i=0;i<k;i++) {
       if (document.links[i].className == 'extiw') {
       document.links[i].className='hiddenextiw';
       }
    }
    var a = document.getElementById('hideshow');
    a.onclick = function() { showextiw(); };
 }
 
 
 /* show wikipedia links */
 function showextiw() {
    var i = 0;
    var k = document.links.length;
    for (i=0;i<k;i++) {
       if (document.links[i].className == 'hiddenextiw') {
          document.links[i].className='extiw';
       }
    }
    var a = document.getElementById('hideshow');
    a.onclick = function() { hideextiw(); };
 }
 
 
 /* add hide tab */
 function addthetab() {
    var a = document.createElement('a');
    a.setAttribute('href', 'javascript:;');
    a.onclick = function() { hideextiw(); };
    a.setAttribute('id', 'hideshow');
    a.appendChild(document.createTextNode('hide/show'));
    var tab = document.createElement('li');
    tab.appendChild(a);
    var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
    tabs.appendChild(tab);
 }
 
 if (window.addEventListener) window.addEventListener("load",addthetab,false);
 else if (window.attachEvent) window.attachEvent("onload",addthetab);
 
 
 /* <bot begin="instaview" username="Zhaladshar"> */
 /* Instaview */
    /* See [[WS:SCRIPTS]]; adds instant preview to edit page. */
       document.write('<script type="text/javascript"'
       + 'src="http://en.wikipedia.org/w/index.php?title=User:Pilaf/instaview.js'
       + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
       InstaView.conf.user.name = 'Zhaladshar';
 /* <bot end="instaview"> */
 
/* </nowiki></pre> */
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
Print/export