MediaWiki:Gadget-runerealm.js: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(Created page with "(function ($, mw) { addDiscordLink(); function addDiscordLink(page) { var url = 'https://www.runerealm.org/discord'; var title = 'Join our Discord to talk about wiki content or becoming an editor.'; 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...") |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
(function ($, mw) { |
(function ($, mw) { |
||
addLink('play', 'Play now and join the fun', 'https://www.runerealm.org/download'); |
|||
⚫ | |||
addLink('discord', 'Join our Discord to talk about wiki content or becoming an editor', 'https://www.runerealm.org/discord'); |
|||
⚫ | |||
⚫ | |||
function addLink(icon, title, url) { |
|||
var link = mw.util.addPortletLink('p-namespaces', url, '', |
|||
// no text - use background-image instead |
|||
'gadget-external-' + icon, |
|||
// 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 addDiscordLink(page) { |
function addDiscordLink(page) { |
||
var url = 'https://www.runerealm.org/discord'; |
var url = 'https://www.runerealm.org/discord'; |
||
var title = 'Join our Discord to talk about wiki content or becoming an editor |
var title = 'Join our Discord to talk about wiki content or becoming an editor'; |
||
var link = mw.util.addPortletLink('p-namespaces', url, '', |
var link = mw.util.addPortletLink('p-namespaces', url, '', |
Latest revision as of 12:51, 20 October 2024
(function ($, mw) {
addLink('play', 'Play now and join the fun', 'https://www.runerealm.org/download');
addLink('discord', 'Join our Discord to talk about wiki content or becoming an editor', 'https://www.runerealm.org/discord');
//addDiscordLink();
function addLink(icon, title, url) {
var link = mw.util.addPortletLink('p-namespaces', url, '',
// no text - use background-image instead
'gadget-external-' + icon,
// 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 addDiscordLink(page) {
var url = 'https://www.runerealm.org/discord';
var title = 'Join our Discord to talk about wiki content or becoming an editor';
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');
}
})(jQuery, mediaWiki);