User:לערי ריינהארט/common.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* Example for [[Bugzilla:021572]] -- [[meta:user:Platonides]] */
addOnloadHook ( function() { if (wgArticleId) addPortletLink("p-tb", wgScript + "?curid=" + wgArticleId, "Short url", "t-curid", "Reference using its article id"); } );
/* modifications: trying ot display the number also */
addOnloadHook ( function() { if (wgArticleId) addPortletLink("p-tb", wgScript + "?curid=" + wgArticleId, "ArticleId:" + wgArticleId, "t-curid", "Reference using and displaying its article id"); } );
if (wgArticleId)
{
var my_short_url = wgScript + "?curid=" + wgArticleId + "&redirect=no";
var my_short_name = "ArticleId:" + wgArticleId;
addPortletLink('p-cactions',my_short_url,my_short_name);
};