×
Create a new article
Write your page title here:
We currently have 245 articles on The Vault @ The EERIE Files. Type your article name above or click on one of the titles below and start writing!



The Vault @ The EERIE Files

MediaWiki:Common.js: Difference between revisions

No edit summary
No edit summary
Line 2: Line 2:


mw.hook('wikipage.content').add(function () {
mw.hook('wikipage.content').add(function () {
    var talkLink = document.querySelector('#ca-talk a, #p-namespaces a[href*="Talk:"]');


     document.querySelectorAll('#ca-talk a, #ca-nstab-talk a').forEach(function(link) {
     if (talkLink) {
 
         var url = new URL(talkLink.href);
         var url = new URL(link.href);
         var title = url.searchParams.get('title');
         var title = url.searchParams.get('title');


         if (title && title.startsWith('Talk:')) {
         if (title) {
             link.href = mw.config.get('wgArticlePath').replace('$1', title);
             talkLink.href = mw.config.get('wgArticlePath').replace('$1', title);
         }
         }
 
     }
     });
 
});
});

Revision as of 12:18, 30 July 2026

/* Any JavaScript here will be loaded for all users on every page load. */

mw.hook('wikipage.content').add(function () {
    var talkLink = document.querySelector('#ca-talk a, #p-namespaces a[href*="Talk:"]');

    if (talkLink) {
        var url = new URL(talkLink.href);
        var title = url.searchParams.get('title');

        if (title) {
            talkLink.href = mw.config.get('wgArticlePath').replace('$1', title);
        }
    }
});