diff --git a/lib/polyfills.js b/lib/polyfills.js index 30e0a61..86f6d13 100644 --- a/lib/polyfills.js +++ b/lib/polyfills.js @@ -287,6 +287,14 @@ exports.Github_enableDiffButton = jss` for (let button of document.getElementsByClassName("load-diff-button")) button.removeAttribute("disabled"); }, {once: true}); + // TEMPORARY: hard-disable Turbo navigation to prevent memory leaks in Pale Moon + document.addEventListener("DOMContentLoaded", () => { + Turbo.session.elementIsNavigatable = (e) => false; + Turbo.session.formMode = "off"; + Turbo.session.willFollowLinkToLocation = (l, ll, e) => false; + const FrameElement = document.createElement("turbo-frame").constructor; + FrameElement.delegateConstructor.prototype.shouldInterceptNavigation = (e, s=null) => false + }); ` exports.Element_attachShadow = jss`