How to access `window` (Target page) objects when @grant values are set?
问题 Let\'s say I am working with the following web page: <html> <body> <span id=\"click\">click me</span> <script> var hello = function() { alert(\'hello\'); } document.getElementById(\'click\').addEventListener(\'click\', function(e) { hello(); }); </script> </body> </html> and my Greasemonkey script is: // ==UserScript== // @name My Script // @include http://example.com/hello.html // @version 1 // @grant none // ==/UserScript== window.hello = function() { alert(\'goodbye\'); } With the