mirror of
https://github.com/arkenfox/user.js.git
synced 2024-11-22 10:31:40 +01:00
Destroyed 4.2.1 User Scripts (markdown)
parent
a7629daa46
commit
0ffe951850
@ -1,33 +0,0 @@
|
|||||||
some scripts... tested in [Firemonkey](https://addons.mozilla.org/firefox/addon/firemonkey/) only.<br><br>
|
|
||||||
Scripts with `@run-at document-start` don't work reliable enough with Greasemonkey (as of GM 4.9)!
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### :small_orange_diamond: window.opener be gone
|
|
||||||
|
|
||||||
* Author: [earthlng](https://github.com/earthlng)
|
|
||||||
* Test: https://mathiasbynens.github.io/rel-noopener/
|
|
||||||
|
|
||||||
```js
|
|
||||||
// ==UserScript==
|
|
||||||
// @name window.opener be gone
|
|
||||||
// @description Prevents tampering with window.opener.
|
|
||||||
// @version 2.1
|
|
||||||
// @match http://*/*
|
|
||||||
// @match https://*/*
|
|
||||||
// @exclude https://www.catalog.update.microsoft.com/DownloadDialog.aspx
|
|
||||||
// @run-at document-start
|
|
||||||
// @namespace arkenfox
|
|
||||||
// @grant GM.notification
|
|
||||||
// Keys for FM:
|
|
||||||
// @allFrames true
|
|
||||||
// @matchAboutBlank true
|
|
||||||
// ==/UserScript==
|
|
||||||
|
|
||||||
if (window.opener !== null) {
|
|
||||||
window.opener = null;
|
|
||||||
|
|
||||||
GM.notification('Cleared window.opener!');
|
|
||||||
console.warn('Cleared window.opener @ ' + document.location.toString());
|
|
||||||
}
|
|
||||||
```
|
|
Loading…
Reference in New Issue
Block a user