Open main menu
Home
Random
Log in
Settings
About ICANNWiki
Disclaimers
ICANNWiki
Search
Changes
← Older edit
Newer edit →
MediaWiki:Common.js
(view source)
Revision as of 23:52, 22 April 2024
192 bytes added
,
5 months ago
no edit summary
Line 1:
Line 1:
document.addEventListener('DOMContentLoaded', function() {
document.addEventListener('DOMContentLoaded', function() {
+
console.log("Script running...");
var links = document.querySelectorAll('a[href*="https://ntldstats.com/tld/"]');
var links = document.querySelectorAll('a[href*="https://ntldstats.com/tld/"]');
+
console.log("Links found: ", links.length);
links.forEach(function(link) {
links.forEach(function(link) {
+
console.log("Original href: ", link.href);
var url = new URL(link.href);
var url = new URL(link.href);
var paths = url.pathname.split('/');
var paths = url.pathname.split('/');
Line 10:
Line 13:
url.pathname = paths.join('/');
url.pathname = paths.join('/');
link.href = url.toString();
link.href = url.toString();
+
console.log("Modified href: ", link.href);
}
}
});
});
MarkWD
Bureaucrats
,
Check users
,
Interface administrators
, steward,
Suppressors
,
Administrators
, translator
1,771
edits