userscripts - warn if unsafeWindow in script
Add a visual warning when scripts use unsafeWindow
Warns when a script incorporates the usage of unsafeWindow, allowing the potential user a better chance to evaluate whether to install it.
2.2 - warns for unsafeDocument as well.
(screenshot includes style from here)
From O'ReillyIt's called unsafeWindow for a reason: its properties and methods could be redefined by the page to do virtually anything. You should never call methods on unsafeWindow unless you completely trust the remote page not to mess with you. You should only ever use it as a parameter to call functions defined by the original page, or to watch window properties, as shown in the next section.
Note: No, this script does not use unsafeWindow but the warning will show since it contains the text string.
Want to show your appreciation? Don't donate to me, rather donate to Ron Paul: a President that will keep the internet free so that scripts like these can lawfully exist.

You could comment on this script if you were logged in.
3 comments
You could comment on this script if you were logged in.

login to vote
Cheers!
login to vote
Fixed, added "?source" to the request. As for the *.userscripts.org well it's just a habbit.
login to vote
No need for
*.userscripts…– this site doesn't usewww..I think this script will increase the install count of any script you visit. Perhaps you could get the source code from the "View script source" page instead, or tack "?source" onto the install URL? That would keep the install counter from turning.