From c34f39216e2eb5c7921348781c2910adf27fae16 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sat, 12 May 2012 00:23:17 +0200 Subject: [PATCH] Prevent userscript in iframe --- couchpotato/core/plugins/userscript/template.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/couchpotato/core/plugins/userscript/template.js b/couchpotato/core/plugins/userscript/template.js index 090a62b..e200afb 100644 --- a/couchpotato/core/plugins/userscript/template.js +++ b/couchpotato/core/plugins/userscript/template.js @@ -12,6 +12,9 @@ // ==/UserScript== +if (window.top != window.self) // Only run on top window + return; + var version = {{version}}, host = '{{host}}', api = '{{api}}';