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 page's logic seems to rely on integer values being returned by window.pageYOffset.
*/
/* globals exportFunction */
const win = window.wrappedJSObject;
const pyo = Object.getOwnPropertyDescriptor(win, "pageYOffset");
const pyoGet = pyo.get;
pyo.get = exportFunction(function () {
return Math.round(pyoGet.call(this));
}, window);
Object.defineProperty(win, "pageYOffset", pyo);