Clickjacking protection

This commit is contained in:
Igor Zhukov 2014-04-30 11:51:18 +08:00
parent 3dfa71daab
commit 47a62324c2
3 changed files with 11 additions and 1 deletions

View File

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

View File

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

View File

@ -23,6 +23,15 @@
<script type="text/javascript"> <script type="text/javascript">
(function () { (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) { window.safeConfirm = function (params, callback) {
if (typeof params === 'string') { if (typeof params === 'string') {
params = {message: params}; params = {message: params};