Skip to content

Commit

Permalink
Show subframe warning by default
Browse files Browse the repository at this point in the history
This ensures that if JavaScript is disabled, we default to the subframe
view. If JavaScript is disabled, it usually indicates that the page is
in a subframe. This page can't work correctly without JavaScript
anyway.
  • Loading branch information
Gudahtt committed May 13, 2022
1 parent 27947d8 commit 999169d
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions static/index.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<style id="antiClickjackSubFrameStyles">
.content__body {
display: none !important;
}
</style>
<style id="antiClickjackTopFrameStyles">
.content__framed-body {
<style id="antiClickjack">
#content__body {
display: none !important;
}
</style>
<script type="text/javascript">
const antiClickjack = document.getElementById('antiClickjack');
if (self === top) {
const antiClickjackSubFrameStyles = document.getElementById('antiClickjackSubFrameStyles');
antiClickjackSubFrameStyles.parentNode.removeChild(antiClickjackSubFrameStyles);
} else {
const antiClickjackTopFrameStyles = document.getElementById('antiClickjackTopFrameStyles');
antiClickjackTopFrameStyles.parentNode.removeChild(antiClickjackTopFrameStyles);
antiClickjack.innerHTML = '#content__framed-body { display: none !important; }';
}
</script>
<title>MetaMask Phishing Detection</title>
Expand Down Expand Up @@ -60,7 +52,7 @@ <h1>
MetaMask Phishing Detection
</h1>
</div>
<div class="content__body">
<div id="content__body" class="content__body">
<p>
This domain is currently on the MetaMask domain warning list. This
means that based on information available to us, MetaMask believes
Expand Down

0 comments on commit 999169d

Please sign in to comment.