Gebruiker:Rots61/common.js: verschil tussen versies
Naar navigatie springen
Naar zoeken springen
Label: Ongedaan maken |
|||
Regel 22: | Regel 22: | ||
if (isMainPage) |
if (isMainPage) |
||
{window.location="https://wikikids.nl/";} |
{window.location="https://wikikids.nl/";} |
||
− | |||
− | // First wait for mediawiki.util to load, and the page to be ready. |
||
− | $.when( mw.loader.using( 'mediawiki.util' ), $.ready ).then( function () { |
||
− | |||
− | // General usage pattern: |
||
− | // mw.util.addPortletLink( portletId, href, text /* Optional: , id, tooltip, accesskey, nextnode */ ); |
||
− | |||
− | // Example: Add a link to mediawiki.org to the Tools area, above the "Special pages" link. |
||
− | var newElement = mw.util.addPortletLink( |
||
− | 'p-tb', |
||
− | 'https://www.mediawiki.org/', |
||
− | 'Link to mediawiki.org', |
||
− | 't-mworg', |
||
− | 'Go to www.mediawiki.org', |
||
− | 'm', |
||
− | '#t-specialpages' |
||
− | ); |
Versie van 11 sep 2021 20:05
mw.loader.using('mediawiki.util', function() {
mw.util.addPortletLink('p-tb',
'https://nl.wikipedia.org/wiki/' + encodeURIComponent(mw.config.get('wgPageName')),
'Wikipedia ', '#wikipedialink', mw.config.get('wgPageName') + " op Wikipedia ");
});
mw.loader.using('mediawiki.util', function() {
mw.util.addPortletLink('p-tb',
'https://www.google.nl/search?q=' + encodeURIComponent(mw.config.get('wgPageName')),
'Google ', '#googlelink', mw.config.get('wgPageName') + " op Google ");
});
mw.loader.using('mediawiki.util', function() {
mw.util.addPortletLink('p-tb',
'https://wikikids.nl/Speciaal:AllePaginas?hideredirects=1&from=' + encodeURIComponent(mw.config.get('wgPageName')),
'Alles ', '#alles', " alles");
});
// Redirecten
var mpTitle = "Wikikids:Visuele tekstverwerker";
var isMainPage = wgPageName == mpTitle
if (isMainPage)
{window.location="https://wikikids.nl/";}