MediaWiki:Gadget-SimpleDiffLink.js

addOnloadHook( => {   const originalUrl = new URL(window.location.href);    const queryParams = new URLSearchParams(originalUrl.search);

if (skin === "oasis" && queryParams.has("oldid") && queryParams.has("diff")) { const wikiPath = originalUrl.pathname.substr(0, originalUrl.pathname.lastIndexOf("/")); const wikiUrl = `${originalUrl.protocol}//${originalUrl.hostname}${wikiPath}/`;

const oldId = queryParams.get("oldid"); const newId = queryParams.get("diff"); const diffUrl = `${wikiUrl}Special:Diff/${oldId}/${newId}`;

const button = " (URL) "; $(".diff-header td:nth-child(2) div:nth-child(1) strong").append(button); } });