Utente:Gvf/ToolbarButton.js: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
Gvf (discussione | contributi) purge |
Gvf (discussione | contributi) + purge |
||
Riga 18:
/* addLoadEvent(ToolbarButton); */
ToolbarButton(); // modifica la Toolbar
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');▼
});▼
▲ // addPurge(); // aggiunge pulsante "purge"
// add_tabs(); // aggiunge i tab
//addToolBoxLinks(); // aggiunge i link nel portlet "strumenti"
Line 217 ⟶ 207:
function addPurge()
{
▲ 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', 'Svuota la cache', '0');
}
▲// 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');
▲//});
function oldaddPurge()
{
ta['ca-purge'] = ['g', 'Pulisci la cache'];
|