From Wikipedia, the free encyclopedia
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.

if(wgIsArticle) {

	addOnloadHook(function() {

		var tbs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];

		addlilink(tbs, "javascript:fix_links()", "highlight", 'ca-taglinks', 'Highlight all links on this page that will activate a script when clicked.');

	});

}



if(location.href.indexOf('action=edit') != -1 && location.href.indexOf('autotag=proxy') != -1) {

	addOnloadHook(function() {

                document.forms0].wpTextbox1.value = "{" + "{subst:User:MichaelBillington/Sandbox/bar}}";

                document.forms0].wpSummary.value = "Open proxy";

                document.forms0].wpMinoredit.checked = true;

                document.forms0].wpWatchthis.checked = true;

                document.forms0].submit();

	});

}



if(location.href.indexOf('action=edit') != -1 && location.href.indexOf('autotag=rt') != -1) {

	addOnloadHook(function() {

                document.forms0].wpTextbox1.value = "#REDIRECT [[User talk:{" + "{SUBST:PAGENAME}}]]";

                document.forms0].wpSummary.value = "Redirecting to talk page";

                document.forms0].wpMinoredit.checked = true;

                document.forms0].wpWatchthis.checked = true;

                document.forms0].submit();

	});

}



if(location.href.indexOf('autotag=submit') != -1) {

	addOnloadHook(function() {

                document.forms0].submit();

	});

}



if(location.href.indexOf('&action=success') != -1) {

	addOnloadHook(function() {

                location.href="about:blank";

	});

}



function fix_links() {

	var links = document.getElementById('bodyContent').getElementsByTagName('a');

	for(var i=0; i<links.length; i++) {

		var link = linksi];

		var cha = (link.href.indexOf('?') != -1) ? '&' : '?';

		if(link.href.indexOf('autotag=') != -1) {

                   link.style.color = "green";

                   link.onmouseup = function() { this.style.color = 'orange'; };

                }



	}

}





//parse paramName out of query string

//stolen from Lupin's popups

function _GET(paramName) {

  var cmdRe=RegExp('[&?]'+paramName+'=([^&]*)');

  var h=document.location;

  var m;

  if (m=cmdRe.exec(h)) {

    try { 

      return unescape(m1]);

    } catch (someError) {}

  }

  return null;

};

//</nowiki></pre>



//    --- ADD VARIOUS LINKS ----

function addToolboxLink(url, name, id){

    var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];

    addlilink(tb, url, name, id);

}

// 

function addTopLink(url, name, id){

    var personal = document.getElementById('p-personal').getElementsByTagName('ul')[0];

    addlilink(personal, url, name, id);

}

// 

function addNavLink(url, name, id){

    var navigation = document.getElementById('p-navigation').getElementsByTagName('ul')[0];

    addlilink(navigation, url, name, id);

}

// 



function addTab(url, name, id, title, key){

    var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];

    return addlilink(tabs, url, name, id, title, key);

}



//



//      ------ MORE MAJOR LINKAGE -----

function addLink(where, url, name, id, title, key, after){

    //* where is the id of the toolbar where the button should be added;

    //   i.e. one of "p-cactions", "p-personal", "p-navigation", or "p-tb".

    //

    //* url is the URL which will be called when the button is clicked.

    //   javascript: urls can be used to do more complex things.

    //

    //* name is what will appear as the name of the button.

    //

    //* id is the id of the button; it's best to define one.  

    //   Use a prefix to make sure its unique. Optional.

    //

    //* title is the tooltip title that gives a longer description 

    //   of the button; if you define a accesskey, mention it here. Optional.

    //

    //* key is the char you want for the accesskey. Optional.

    //

    //* after is the id of the button you want to follow this one. Optional.

    //

    var na = document.createElement('a');

    na.href = url;

    na.appendChild(document.createTextNode(name));

    var li = document.createElement('li');

    if(id) li.id = id;

    li.appendChild(na);

    var tabs = document.getElementById(where).getElementsByTagName('ul')[0];

    if(after) {

        tabs.insertBefore(li,document.getElementById(after));

    } else {

        tabs.appendChild(li);

    }

    if(id) {

        if(key && title) { taid = key, title]; }

        else if(key) { taid = key, '']; }

        else if(title) { taid = '', title];} 

    }

    // re-render the title and accesskeys from existing code in wikibits.js

    akeytt();

    return li;

}

    

// 



// ------------- LINKAGE ----------------



function addlilink(tabs, url, name, id, title, key){

    var na = document.createElement('a');

    na.href = url;

    na.appendChild(document.createTextNode(name));

    var li = document.createElement('li');

    if(id) li.id = id;

    li.appendChild(na);

    tabs.appendChild(li);

    if(id)

    {

        if(key && title)

        {

            taid = key, title];

        }

        else if(key)

        {

            taid = key, ''];

        }

        else if(title)

        {

            taid = '', title];

        }

    }

    // re-render the title and accesskeys from existing code in wikibits.js

    akeytt();

    return li;

}
From Wikipedia, the free encyclopedia
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.

if(wgIsArticle) {

	addOnloadHook(function() {

		var tbs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];

		addlilink(tbs, "javascript:fix_links()", "highlight", 'ca-taglinks', 'Highlight all links on this page that will activate a script when clicked.');

	});

}



if(location.href.indexOf('action=edit') != -1 && location.href.indexOf('autotag=proxy') != -1) {

	addOnloadHook(function() {

                document.forms0].wpTextbox1.value = "{" + "{subst:User:MichaelBillington/Sandbox/bar}}";

                document.forms0].wpSummary.value = "Open proxy";

                document.forms0].wpMinoredit.checked = true;

                document.forms0].wpWatchthis.checked = true;

                document.forms0].submit();

	});

}



if(location.href.indexOf('action=edit') != -1 && location.href.indexOf('autotag=rt') != -1) {

	addOnloadHook(function() {

                document.forms0].wpTextbox1.value = "#REDIRECT [[User talk:{" + "{SUBST:PAGENAME}}]]";

                document.forms0].wpSummary.value = "Redirecting to talk page";

                document.forms0].wpMinoredit.checked = true;

                document.forms0].wpWatchthis.checked = true;

                document.forms0].submit();

	});

}



if(location.href.indexOf('autotag=submit') != -1) {

	addOnloadHook(function() {

                document.forms0].submit();

	});

}



if(location.href.indexOf('&action=success') != -1) {

	addOnloadHook(function() {

                location.href="about:blank";

	});

}



function fix_links() {

	var links = document.getElementById('bodyContent').getElementsByTagName('a');

	for(var i=0; i<links.length; i++) {

		var link = linksi];

		var cha = (link.href.indexOf('?') != -1) ? '&' : '?';

		if(link.href.indexOf('autotag=') != -1) {

                   link.style.color = "green";

                   link.onmouseup = function() { this.style.color = 'orange'; };

                }



	}

}





//parse paramName out of query string

//stolen from Lupin's popups

function _GET(paramName) {

  var cmdRe=RegExp('[&?]'+paramName+'=([^&]*)');

  var h=document.location;

  var m;

  if (m=cmdRe.exec(h)) {

    try { 

      return unescape(m1]);

    } catch (someError) {}

  }

  return null;

};

//</nowiki></pre>



//    --- ADD VARIOUS LINKS ----

function addToolboxLink(url, name, id){

    var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];

    addlilink(tb, url, name, id);

}

// 

function addTopLink(url, name, id){

    var personal = document.getElementById('p-personal').getElementsByTagName('ul')[0];

    addlilink(personal, url, name, id);

}

// 

function addNavLink(url, name, id){

    var navigation = document.getElementById('p-navigation').getElementsByTagName('ul')[0];

    addlilink(navigation, url, name, id);

}

// 



function addTab(url, name, id, title, key){

    var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];

    return addlilink(tabs, url, name, id, title, key);

}



//



//      ------ MORE MAJOR LINKAGE -----

function addLink(where, url, name, id, title, key, after){

    //* where is the id of the toolbar where the button should be added;

    //   i.e. one of "p-cactions", "p-personal", "p-navigation", or "p-tb".

    //

    //* url is the URL which will be called when the button is clicked.

    //   javascript: urls can be used to do more complex things.

    //

    //* name is what will appear as the name of the button.

    //

    //* id is the id of the button; it's best to define one.  

    //   Use a prefix to make sure its unique. Optional.

    //

    //* title is the tooltip title that gives a longer description 

    //   of the button; if you define a accesskey, mention it here. Optional.

    //

    //* key is the char you want for the accesskey. Optional.

    //

    //* after is the id of the button you want to follow this one. Optional.

    //

    var na = document.createElement('a');

    na.href = url;

    na.appendChild(document.createTextNode(name));

    var li = document.createElement('li');

    if(id) li.id = id;

    li.appendChild(na);

    var tabs = document.getElementById(where).getElementsByTagName('ul')[0];

    if(after) {

        tabs.insertBefore(li,document.getElementById(after));

    } else {

        tabs.appendChild(li);

    }

    if(id) {

        if(key && title) { taid = key, title]; }

        else if(key) { taid = key, '']; }

        else if(title) { taid = '', title];} 

    }

    // re-render the title and accesskeys from existing code in wikibits.js

    akeytt();

    return li;

}

    

// 



// ------------- LINKAGE ----------------



function addlilink(tabs, url, name, id, title, key){

    var na = document.createElement('a');

    na.href = url;

    na.appendChild(document.createTextNode(name));

    var li = document.createElement('li');

    if(id) li.id = id;

    li.appendChild(na);

    tabs.appendChild(li);

    if(id)

    {

        if(key && title)

        {

            taid = key, title];

        }

        else if(key)

        {

            taid = key, ''];

        }

        else if(title)

        {

            taid = '', title];

        }

    }

    // re-render the title and accesskeys from existing code in wikibits.js

    akeytt();

    return li;

}

Videos

Youtube | Vimeo | Bing

Websites

Google | Yahoo | Bing

Encyclopedia

Google | Yahoo | Bing

Facebook