From 3138df1c7b2e5953611cc0e193d5eb4840c39cc9 Mon Sep 17 00:00:00 2001 From: opi Date: Mon, 17 Feb 2014 13:48:04 +0100 Subject: [PATCH] Prevent YNHPortal button to be added on iframe. --- portal/assets/js/ynhpanel.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/portal/assets/js/ynhpanel.js b/portal/assets/js/ynhpanel.js index 3b8366c..9762135 100644 --- a/portal/assets/js/ynhpanel.js +++ b/portal/assets/js/ynhpanel.js @@ -119,6 +119,8 @@ function domReady(cb) { Main ---------------------------------------------------------- */ domReady(function(){ + // Don't do this in iframe + if (window.self !== window.top) {return false;} // Add portal stylesheet var portalStyle = document.createElement("link");