Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
MediaWiki:Common.js
(view source)
Revision as of 23:52, 22 April 2024
192 bytes added
,
1 month 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
782
edits
Navigation menu
Personal tools
English
Log in
Request account
Namespaces
Message
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Home
Recent changes
Random page
Contact us
Sponsor us
Tools
Special pages
Printable version