Skip to content

Commit

Permalink
Merge branch 'pls-merge' of https://github.com/holy-unblocker/rammerh…
Browse files Browse the repository at this point in the history
…ead-fork-aio into fix-cross-origin-iframing

merge fix for cross-origin proxy iframing
  • Loading branch information
binary-person committed Jun 25, 2022
2 parents ee5bcc7 + 1c1d255 commit 1d5eb0a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ fs.writeFileSync(
'!sameOriginCheck(window1Location, window2Location)',
'!(sameOriginCheck(window1Location, window2Location) && (!!window1["%is-hammerhead%"] === !!window2["%is-hammerhead%"]))'
)
// return false when unable to convert properties on other windows to booleans (!)
.replace(
/!(parent|parentWindow|window1|window2|window\.top)\[("%(?:is-)?hammerhead%")]/g,
'!(() => { try{ return $1[$2]; }catch(error){ return true } })()'
)

// disable saving to localStorage as we are using a completely different implementation
.replace('saveToNativeStorage = function () {', 'saveToNativeStorage = function () {return;')
Expand Down

0 comments on commit 1d5eb0a

Please sign in to comment.