Удзельнік:לערי ריינהארט/monobook.js
Заўвага: каб пабачыць зьмены пасьля публікацыі, Вам можа спатрэбіцца ачысьціць кэш Вашага браўзэра.
- Firefox / Safari: трымайце Shift і націсьніце Reload, ці націсьніце Ctrl-F5 ці Ctrl-R (⌘-R на Mac)
- Google Chrome: націсьніце Ctrl-Shift-R (⌘-Shift-R на Mac)
- Internet Explorer / Edge: трымайце Ctrl і націсьніце Refresh, ці націсьніце Ctrl-F5
- Opera: націсьніце Ctrl-F5.
/** extract a URL parameter from the current URL **********
* From [[commons:en:user:Lupin/autoedit.js]]
*
* paramName : the name of the parameter to extract
*/
function getParamValue( paramName, url)
{
if (typeof (url) == 'undefined' ) url = document.location.href;
var cmdRe=RegExp( '[&?]' + paramName + '=([^&]*)' );
var m=cmdRe.exec(url);
if (m) {
try {
return decodeURIComponent(m[1]);
} catch (someError) {}
}
return null;
}
/* [[commons:Bugzilla:021572]] -- [[commons:meta:user:Platonides]] */
$ ( function() { if (wgArticleId) mw.util.addPortletLink("p-tb", wgScript + "?curid=" + wgArticleId + ( ((wgNamespaceNumber == 24) && getParamValue('dataset')) ? "&dataset=" + getParamValue('dataset') : "" ) , "Short url", "t-curid", "Reference using its article id"); } );