Tampermonkey / tampermonkey

Tampermonkey is the most popular userscript manager, with over 10 million users. It's available for Chrome, Microsoft Edge, Safari, Opera Next, and Firefox.
GNU General Public License v3.0
4.17k stars 416 forks source link

unsafeWindow is not defined #412

Closed Ack0 closed 7 years ago

Ack0 commented 7 years ago

Tampermonkey v4.4.5499 Chrome v61.0.3141.8

Hi,

I don't know if this is a Tampermonkey's bug, but this script[1] does not works and I got this on console:

22:04:24.824 VM2635:80 sort by data-cost
22:04:24.824 VM2635:85 Uncaught ReferenceError: unsafeWindow is not defined
    at sortBy (eval at <anonymous> (:2:398), <anonymous>:85:11)
    at HTMLAnchorElement.eval (eval at <anonymous> (:2:398), <anonymous>:103:8)
    at HTMLAnchorElement.dispatch (https://cdn.steamgifts.com/js/minified_v26.js:1:50482)
    at HTMLAnchorElement.g.handle (https://cdn.steamgifts.com/js/minified_v26.js:1:48493)

[1] https://greasyfork.org/en/scripts/28791-heroboy-s-steamgifts-one-click-entry

derjanb commented 7 years ago

unsafeWindow is not available if

// @grant        none

is used. Please ask the script author to fix the issue.