This commit is contained in:
Juhani Krekelä 2024-07-30 00:38:10 +03:00
parent c913086788
commit bdfda5ff5b

View file

@ -1,12 +1,14 @@
// ==UserScript==
// @name The Old New Thing link unfucker
// @version 1
// @version 2
// @grant none
// @match https://devblogs.microsoft.com/oldnewthing/*
// ==/UserScript==
const rewriteRules = [
[/^http:\/\/blogs.msdn.com\/b\/oldnewthing\/archive\/([0-9]{4})\/([0-9]{2})\/([0-9]{2})\/[0-9]+.aspx(#.*)?$/,
'https://devblogs.microsoft.com/oldnewthing/$1$2$3-00/'],
[/^https:\/\/blogs.msdn.microsoft.com\//,
'https://devblogs.microsoft.com/'],
];
for (const link of document.getElementsByTagName('a')) {