Browse Source

Clickjacking protection

master
Igor Zhukov 11 years ago
parent
commit
47a62324c2
  1. 2
      app/app.manifest
  2. 1
      app/css/app.css
  3. 9
      app/index.html

2
app/app.manifest

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
CACHE MANIFEST
# 4
# 5
NETWORK:
*

1
app/css/app.css

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
/* app css stylesheet */
html {
display: none;
background: #dee4e9 url(../img/bg_tile.png) 0 0 repeat;
/*background-size: 300px 468px;*/
}

9
app/index.html

@ -23,6 +23,15 @@ @@ -23,6 +23,15 @@
<script type="text/javascript">
(function () {
// Prevent click-jacking
try {
if (self == top) {
document.documentElement.style.display = 'block';
} else {
top.location = self.location;
}
} catch (e) {console.error('CJ protection', e)};
window.safeConfirm = function (params, callback) {
if (typeof params === 'string') {
params = {message: params};

Loading…
Cancel
Save