×
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

Created page with "Any JavaScript here will be loaded for all users on every page load.: mw.hook('wikipage.content').add(function () { document.querySelectorAll('a[href*="index.php?title=Talk:"]').forEach(function(link) { let url = new URL(link.href); let title = url.searchParams.get('title'); if (title) { link.href = mw.config.get('wgArticlePath').replace('$1', title); } }); });"
 
No edit summary
Line 2: Line 2:


mw.hook('wikipage.content').add(function () {
mw.hook('wikipage.content').add(function () {
    document.querySelectorAll('a[href*="index.php?title=Talk:"]').forEach(function(link) {
        let url = new URL(link.href);
        let title = url.searchParams.get('title');


         if (title) {
    document.querySelectorAll('#ca-talk a, #ca-nstab-talk a').forEach(function(link) {
 
        var url = new URL(link.href);
        var title = url.searchParams.get('title');
 
         if (title && title.startsWith('Talk:')) {
             link.href = mw.config.get('wgArticlePath').replace('$1', title);
             link.href = mw.config.get('wgArticlePath').replace('$1', title);
         }
         }
     });
     });
});
});

Revision as of 12:16, 30 July 2026

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

mw.hook('wikipage.content').add(function () {

    document.querySelectorAll('#ca-talk a, #ca-nstab-talk a').forEach(function(link) {

        var url = new URL(link.href);
        var title = url.searchParams.get('title');

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

    });

});