User:Tollens/subnetContribs.js

$.when(mw.loader.using(["mediawiki.util"]), $.ready).done(function {	var currentPage = mw.config.get("wgPageName");

if (currentPage.startsWith("Special:Contributions/")) { var user = mw.config.get("wgRelevantUserName");

if (mw.util.isIPv6Address(user)) { var fullAddition = document.createElement("span"); var rangeLink = document.createElement("a"); rangeLink.href = "https://en.wikipedia.org/wiki/" + currentPage + "/64"; rangeLink.textContent = "/64"; fullAddition.appendChild(document.createTextNode(" ("));			fullAddition.appendChild(rangeLink);			fullAddition.appendChild(document.createTextNode(")"));

document.getElementById("firstHeading").appendChild(fullAddition); }	} });