deduplicated the scrollintoview
Dieser Commit ist enthalten in:
Ursprung
a93a82ee4f
Commit
456b0c74be
1 geänderte Dateien mit 7 neuen und 8 gelöschten Zeilen
|
@ -1,18 +1,17 @@
|
||||||
/// disablejump.js
|
/// disablejump.js
|
||||||
(function() {
|
(function () {
|
||||||
function fakescroll() {
|
function fakescroll() {
|
||||||
console.debug("Tried to scroll using absolute coords", arguments)
|
console.debug("Tried to scroll using absolute coords", arguments);
|
||||||
|
}
|
||||||
|
function fakescrollintoview() {
|
||||||
|
console.debug("Tried to scroll to element:", this);
|
||||||
}
|
}
|
||||||
window.scroll(0, 0);
|
window.scroll(0, 0);
|
||||||
HTMLElement.prototype.scrollIntoView = function() {
|
|
||||||
console.debug("Tried to scroll");
|
|
||||||
};
|
|
||||||
window.scroll = fakescroll;
|
window.scroll = fakescroll;
|
||||||
window.scrollBy = fakescroll;
|
window.scrollBy = fakescroll;
|
||||||
window.scrollByLines = fakescroll;
|
window.scrollByLines = fakescroll;
|
||||||
window.scrollByPages = fakescroll;
|
window.scrollByPages = fakescroll;
|
||||||
Element.prototype.scrollIntoView = function(){
|
HTMLElement.prototype.scrollIntoView = fakescrollintoview;
|
||||||
console.debug("Tried to scroll to element:", this)
|
|
||||||
}
|
|
||||||
console.debug("Jump disabled");
|
console.debug("Jump disabled");
|
||||||
})();
|
})();
|
||||||
|
|
Laden …
Tabelle hinzufügen
In neuem Issue referenzieren