Last active
October 28, 2023 18:06
-
-
Save JamesYeoman/cdda215151db29c9c374b5ecab271799 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Pathbuilder 2e Temp Fix | |
// @namespace https://github.com/JamesYeoman | |
// @version 0.1 | |
// @description Temporarily patch a dodgy JS issue | |
// @author https://github.com/JamesYeoman | |
// @match https://pathbuilder2e.com/app.html?v=71a | |
// @updateURL https://gist.github.com/JamesYeoman/cdda215151db29c9c374b5ecab271799/raw/pathbuilder2e.user.js | |
// @downloadURL https://gist.github.com/JamesYeoman/cdda215151db29c9c374b5ecab271799/raw/pathbuilder2e.user.js | |
// @icon none | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
window.addEventListener("load", function() { | |
if ("jwt_decode" in window) return; | |
// No redirects registered for the broken script src. Time to load v3.1.2 | |
let nonESM = document.createElement("script"); | |
nonESM.setAttribute("src", "https://unpkg.com/[email protected]/build/jwt-decode.js"); | |
document.getElementsByTagName("head")[0].append(nonESM); | |
}) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment