Skip to content

Commit

Permalink
Load in some iframes such as Google translation
Browse files Browse the repository at this point in the history
  • Loading branch information
mooz committed Aug 14, 2019
1 parent c9e9562 commit 1895b0e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/content-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@
}
}

const IFRAME_WHITE_LIST = ["https://translate.googleusercontent.com"];

// Do not load in ifrmae pages
if (window !== window.parent || inIframe()) {
if (
window !== window.parent &&
IFRAME_WHITE_LIST.every(prefix => location.href.indexOf(prefix) === -1)
) {
return;
}

Expand Down

0 comments on commit 1895b0e

Please sign in to comment.