Difference between revisions of "User:Anonymax/monobook.js"

From CWCki
Jump to navigation Jump to search
(Created page with '// addPurge addOnloadHook(function () { var hist; var url; if (!(hist = document.getElementById('ca-history') )) return; if (!(url = hist.getElementsByTagName('a')[0]…')
 
m
 
Line 1: Line 1:
// addPurge
// addPurge
addOnloadHook(function () {
addOnloadHook(function () {
    var hist; var url;
var hist; var url;
    if (!(hist = document.getElementById('ca-history') )) return;
if (!(hist = document.getElementById('ca-history') )) return;
    if (!(url = hist.getElementsByTagName('a')[0] )) return;
if (!(url = hist.getElementsByTagName('a')[0] )) return;
    if (!(url = url.href )) return;
if (!(url = url.href )) return;
    addPortletLink('p-cactions', url.replace(/([?&]action=)history([&#]|$)/, '$1purge$2'),
addPortletLink('p-cactions', url.replace(/([?&]action=)history([&#]|$)/, '$1purge$2'),
                  'Purge', 'ca-purge', 'Purge server cache for this page', '0');
'Purge', 'ca-purge', 'Purge server cache for this page', '0');
});
});
//

Latest revision as of 20:58, 26 April 2010

// addPurge
addOnloadHook(function () {
var hist; var url;
if (!(hist = document.getElementById('ca-history') )) return;
if (!(url = hist.getElementsByTagName('a')[0] )) return;
if (!(url = url.href )) return;
addPortletLink('p-cactions', url.replace(/([?&]action=)history([&#]|$)/, '$1purge$2'),
'Purge', 'ca-purge', 'Purge server cache for this page', '0');
});