Source code
Revision control
Copy as Markdown
Other Tools
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
"use strict";
/*
*
* The site is detecting Firefox by checking for MozAppearance on the document element,
* and refuses to load the page if it cannot be found. We can define it as "" to fix this.
*/
/* globals exportFunction */
console.info(
"Overriding MozAppearance in element.style for compatibility reasons. See https://bugzilla.mozilla.org/show_bug.cgi?id=1979612 for details."
);
(function () {
const ele = HTMLElement.wrappedJSObject.prototype;
const obj = window.wrappedJSObject.Object;
const style = obj.getOwnPropertyDescriptor(ele, "style");
const { get } = style;
style.get = exportFunction(function () {
const styles = get.call(this);
styles.MozAppearance = "";
return styles;
}, window);
obj.defineProperty(ele, "style", style);
})();