From 981dd482f911b8149752bf3c226b09304ef4b349 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Mon, 9 Feb 2015 22:29:31 +1100 Subject: [PATCH] Invalidate any content script --- README.md | 2 ++ index.html | 2 ++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index afbe9d7..b1d7e52 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,8 @@ function getIPs(callback){ //bypass naive webrtc blocking if (!RTCPeerConnection) { var iframe = document.createElement('iframe'); + //invalidate content script + iframe.sandbox = 'allow-same-origin'; iframe.style.display = 'none'; document.body.appendChild(iframe); var win = iframe.contentWindow; diff --git a/index.html b/index.html index a53b300..d5c563f 100644 --- a/index.html +++ b/index.html @@ -32,6 +32,8 @@ //bypass naive webrtc blocking if (!RTCPeerConnection) { var iframe = document.createElement('iframe'); + //invalidate content script + iframe.sandbox = 'allow-same-origin'; iframe.style.display = 'none'; document.body.appendChild(iframe); var win = iframe.contentWindow;