User:לערי ריינהארט/shortest url'.js
Jump to navigation
Jump to search
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)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* adding a shortest url; this is helpful for titles with other characters then A..Z a..z 0..9 */
/* Example for [[Bugzilla:023427#c23]] */
/* version: 0.02e 2014-05-25 */
/* variants: */
/* https://ht.wikipedia.org/?curid=62564#top workes with MediaWiki 1.24wmf5 (0320cdd) 2014-05-25 */
if (wgArticleId)
{
var workaround_link = 'https://www.wikidata.org/' + '?curid=' + wgArticleId + '#top';
var workaround_text = 'ArticleId:' + wgArticleId ;
/* */
alert('shortest url.js');
/* */
mw.util.addPortletLink(
'p-cactions',
/* wgServer + '?curid=' + wgArticleId + '#top', */
/* workaround */
/* 'https://www.wikidata.org/' + '?curid=' + wgArticleId + '#top', */
workaround_link,
/* 'ArticleId:' + wgArticleId */
workaround_text
)
}