Skip to content

Commit

Permalink
Add script to prevent cross-frame scripting
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Balestrieri committed Apr 21, 2017
1 parent 14737d9 commit 60d8b04
Show file tree
Hide file tree
Showing 250 changed files with 3,250 additions and 0 deletions.
13 changes: 13 additions & 0 deletions public/_layout.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
13 changes: 13 additions & 0 deletions www/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
13 changes: 13 additions & 0 deletions www/assets/icons/crosswalk-landing-check.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
13 changes: 13 additions & 0 deletions www/assets/icons/crosswalk-landing-question.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
13 changes: 13 additions & 0 deletions www/blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
13 changes: 13 additions & 0 deletions www/blog/android-64bit.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
13 changes: 13 additions & 0 deletions www/blog/announce-linux-dt.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
13 changes: 13 additions & 0 deletions www/blog/announcing-web-testing-service.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
13 changes: 13 additions & 0 deletions www/blog/chinese-web-release.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
13 changes: 13 additions & 0 deletions www/blog/copu2015-award.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
13 changes: 13 additions & 0 deletions www/blog/crosswalk-10-beta.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
13 changes: 13 additions & 0 deletions www/blog/crosswalk-10-stable.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
13 changes: 13 additions & 0 deletions www/blog/crosswalk-101-new-html5-application-runtime.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
13 changes: 13 additions & 0 deletions www/blog/crosswalk-11-beta.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
13 changes: 13 additions & 0 deletions www/blog/crosswalk-12-beta.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
13 changes: 13 additions & 0 deletions www/blog/crosswalk-14-beta.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
13 changes: 13 additions & 0 deletions www/blog/crosswalk-15-beta.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
13 changes: 13 additions & 0 deletions www/blog/crosswalk-16.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
13 changes: 13 additions & 0 deletions www/blog/crosswalk-2015-summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
13 changes: 13 additions & 0 deletions www/blog/crosswalk-9-stable.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@
<script src="/js/i18n.js"></script>
<script src="/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script language="javascript" type="text/javascript">
var style = document.createElement('style');
style.type = "text/css";
style.id = "antiClickjack";
style.innerHTML = "body{display:none !important;}";
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack");
antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
</script>

</head>
<body>
<!-- If curr page named 'index' and less than 2 dirs deep,
Expand Down
Loading

0 comments on commit 60d8b04

Please sign in to comment.