User:The JoTS/common.js

importArticles( {   type: 'script',    articles: [        "u:dev:RecentChangesMultiple/code.2.js",        "u:dev:LastEdited/code.js",        'u:dev:MediaWiki:PurgeButton.js'    ] } );

$(function {   /*** RCM mod **************************************/    // Add to tools menu    $("#my-tools-menu").append( $(""       + "RCM"        + "") );   // Open wikilinks in new tab    if (!$("body.page-User_The_JoTS_RCM").length) return;    var $rcm; // to hold RCM div    setInterval(function { if (!($rcm = $rcm || $("div#mw-content-text .rcm0")).length) return; var aList = $rcm[0].getElementsByTagName('A'); for (var i = 0; i < aList.length; i++) { var a = aList[i]; if ( !a.classList.contains("rcm-a-modded")                && a.hasAttribute("href") ) { a.setAttribute("target", "RCM"); a.className += " rcm-a-modded"; }       }    }, 500); } );