Bureaucrats, editor, Interface administrators, Administrators (Semantic MediaWiki), Curators (Semantic MediaWiki), Editors (Semantic MediaWiki), Administrators
47,390
edits
No edit summary |
No edit summary |
||
Line 11:
if (namespace === -1 || namespace === 8) {
var page = mw.config.get('wgPageName');
// addLink('the RuneScape Wiki', 'rsw', page);
// addLink('the RuneScape Classic Wiki', 'classicrsw', page);
Line 34 ⟶ 33:
}
// var link = mw.util.addPortletLink('p-namespaces', url, '',▼
// // no text - use background-image instead▼
// 'gadget-external-discord',▼
// // button id▼
// title // title text shown on hover▼
// );▼
// // for styling all links at once - addPortletLink only sets an id▼
// //$(link).addClass('gadget-external-icon');▼
//}▼
function addLink(page) {▼
var url = mw.util.getUrl('discord:' + page);▼
var title = 'Discord also has an article on ' + page + '.';▼
// Special and MediaWiki namespaces▼
if (namespace === -1 || namespace === 8) {▼
url += window.location.search; // include url parameters▼
title = 'Open this page on Discord.';▼
}▼
var link = mw.util.addPortletLink('p-namespaces', url, '',
// no text - use background-image instead
Line 66 ⟶ 45:
// for styling all links at once - addPortletLink only sets an id
//$(link).addClass('gadget-external-icon');
}
▲ // var url = mw.util.getUrl('discord:' + page);
▲ // var title = 'Discord also has an article on ' + page + '.';
▲ // // Special and MediaWiki namespaces
▲ // if (namespace === -1 || namespace === 8) {
▲ // url += window.location.search; // include url parameters
▲ // title = 'Open this page on Discord.';
▲ // }
▲ // var link = mw.util.addPortletLink('p-namespaces', url, '',
▲ // // no text - use background-image instead
▲ // 'gadget-external-discord',
▲ // // button id
▲ // title // title text shown on hover
▲ // );
▲ // // for styling all links at once - addPortletLink only sets an id
▲ //}
//function addLink(wikiname, interwiki, page) {
|