MediaWiki:Gadget-topIcons.js: Difference between revisions

Blanked the page
(Created page with "→‎* * Moves icons from [[Template:External]] to the top bar; rewritten from scratch for modern mediawiki * @author Gaz Lloyd: $(function () { if (mw.config.get('wgNamespaceNumber') === -1 || mw.config.get('wgNamespaceNumber') === 8) { mw.util.addPortletLink( 'p-namespaces', mw.util.getUrl('rsw:'+mw.config.get('wgPageName')), '', 'ca-nstab-external-link-rs', 'Open this '+(mw.config.get('wgNamespaceNumber') === -1 ? 'Special page':'system message')+' on...")
 
(Blanked the page)
Tag: Blanking
 
Line 1: Line 1:
/**
 
* Moves icons from [[Template:External]] to the top bar; rewritten from scratch for modern mediawiki
* @author Gaz Lloyd
*/
$(function () {
if (mw.config.get('wgNamespaceNumber') === -1 || mw.config.get('wgNamespaceNumber') === 8) {
mw.util.addPortletLink(
'p-namespaces',
mw.util.getUrl('rsw:'+mw.config.get('wgPageName')),
'',
'ca-nstab-external-link-rs',
'Open this '+(mw.config.get('wgNamespaceNumber') === -1 ? 'Special page':'system message')+' on the RuneScape Wiki'
);
mw.util.addPortletLink(
'p-namespaces',
mw.util.getUrl('classicrsw:'+mw.config.get('wgPageName')),
'',
'ca-nstab-external-link-rsc',
'Open this '+(mw.config.get('wgNamespaceNumber') === -1 ? 'Special page':'system message')+' on the RuneScape Classic Wiki'
);
} else {
$('div.rs-external-header-links span.rs-header-icon').each(function(i,e){
var $e = $(e);
var url, site, tooltip;
url = $e.find('a').attr('href');
site = $e.attr('data-site');
tooltip = $e.attr('data-title');
text = $e.attr('data-text');
mw.util.addPortletLink(
'p-namespaces',
url,
'',
'ca-nstab-external-link-'+site,
tooltip
);
});
$('div.rs-external-header-links').remove();
}
})