userscripts - warn if unsafeWindow in script

By jk- Last update Nov 30, 2007 — Installed 613 times.
Add a visual warning when scripts use unsafeWindow

This script has no reviews.

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.