Jump to content

User:ColinFine/monobook.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by ColinFine (talk | contribs) at 16:57, 18 November 2006 (Add 'Changes since I last edited' and 'View source'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// [[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>');

/* Takes the wikipage "page" and includes its raw text as javascript. */

function import_module(page){
    if( document.createElement && document.childNodes ) {
        var url = 
            'http://en.wikipedia.org/w/index.php?title=' + 
            page.replace(/ /g, "_") + 
            '&action=raw&ctype=text/javascript&dontcountme=s';
        var scriptElem = document.createElement('script');
        scriptElem.setAttribute('src',url);
        scriptElem.setAttribute('type','text/javascript');
        document.getElementsByTagName('head')[0].appendChild(scriptElem);
    }
  }

import_module('Wikipedia:WikiProject User scripts/Scripts/addLink');
//From http://en.wikipedia.org/w/index.php?title=User:JesseW/monobook.js&oldid=20755510

function addSinceTab() {
    var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
    if (window.location.href.indexOf("&action=history&gotosince=true")!=-1) {
       do_since_I_last_edited()
    }
    else if (!/wiki\/Special:|w\/index.php?title=Special:/.test(window.location.href)) {
       var thetitle=document.title.slice(0, String(document.title).indexOf(" - "));
       var l=addlilink(tabs, "/w/index.php?title="+thetitle+"&action=history&gotosince=true", 'Changes since I last edited', '');
       l.lastChild.title="Changes since I last edited";
    }
  }
import_module('Wikipedia:WikiProject User scripts/Scripts/addLink');

import_module('Wikipedia:WikiProject User scripts/Scripts/Add LI link');

import_module('Wikipedia:WikiProject User scripts/Scripts/Add tab');

import_module('Wikipedia:WikiProject User scripts/Scripts/Show last diff');

import_module('Wikipedia:WikiProject User scripts/Scripts/Changes since I last edited');

import_module('Wikipedia:WikiProject User scripts/Scripts/Replace');

import_module('User:Misza13/Scripts/View source');