userscripts

How can I access built-in methods of an Object that is overridden?

吃可爱长大的小学妹 提交于 2021-01-04 02:49:23
问题 A webpage is setting a built-in javascript method to null , and I'm trying to find a way to call the overridden methods in a userscript. Consider the following code: // Overriding the native method to something else document.querySelectorAll = null; Now, if I try to execute document.querySelectorAll('#an-example') , I will get the exception Uncaught TypeError: null is not a function . The reason being the method has been changed to null and is no longer accessible. I'm looking for a way to

How can I access built-in methods of an Object that is overridden?

不羁岁月 提交于 2021-01-04 02:48:09
问题 A webpage is setting a built-in javascript method to null , and I'm trying to find a way to call the overridden methods in a userscript. Consider the following code: // Overriding the native method to something else document.querySelectorAll = null; Now, if I try to execute document.querySelectorAll('#an-example') , I will get the exception Uncaught TypeError: null is not a function . The reason being the method has been changed to null and is no longer accessible. I'm looking for a way to

How can I access built-in methods of an Object that is overridden?

瘦欲@ 提交于 2021-01-04 02:47:22
问题 A webpage is setting a built-in javascript method to null , and I'm trying to find a way to call the overridden methods in a userscript. Consider the following code: // Overriding the native method to something else document.querySelectorAll = null; Now, if I try to execute document.querySelectorAll('#an-example') , I will get the exception Uncaught TypeError: null is not a function . The reason being the method has been changed to null and is no longer accessible. I'm looking for a way to

How can I access built-in methods of an Object that is overridden?

假如想象 提交于 2021-01-04 02:46:59
问题 A webpage is setting a built-in javascript method to null , and I'm trying to find a way to call the overridden methods in a userscript. Consider the following code: // Overriding the native method to something else document.querySelectorAll = null; Now, if I try to execute document.querySelectorAll('#an-example') , I will get the exception Uncaught TypeError: null is not a function . The reason being the method has been changed to null and is no longer accessible. I'm looking for a way to

How to run userscript(/greasemonkey) after AngularJS library is loaded

柔情痞子 提交于 2020-12-01 07:52:48
问题 I just want to create some extensions to angular object to make AngularJS debugging more convenient. But when I run add userscript, it can't find an angular object. AngularJS library is loaded in the bottom of tag. UPD : @estus provided right answer, but if you want to use chrome you need to install it via Tampermonkey extension. You can find final code snippet here. 回答1: The fact that Angular is unavailable at the moment when user script runs indicates that Angular is loaded asynchronously,