fix of CSP violations like unsafe-eval

This commit is contained in:
Simon Grim 2015-07-19 05:23:50 +05:00
parent 107754752a
commit ec73147c75
5 changed files with 8 additions and 11 deletions

View File

@ -276,7 +276,7 @@
<div class="modal-header"> <div class="modal-header">
<h3></h3> <h3></h3>
<span id="closeModal" class="modal-close cancel">&times;</span> <span id="closeModal" class="modal-close cancel">&times;</span>
<span class="modal-back" onClick="history.back();">&lt;</span> <span class="modal-back">&lt;</span>
<span class="mark-all-as-read"></span> <span class="mark-all-as-read"></span>
</div> </div>
<div class="modal-content"></div> <div class="modal-content"></div>

View File

@ -370,7 +370,7 @@
<div class="modal-header"> <div class="modal-header">
<h3></h3> <h3></h3>
<span id="closeModal" class="modal-close cancel">&times;</span> <span id="closeModal" class="modal-close cancel">&times;</span>
<span class="modal-back" onClick="history.back();">&lt;</span> <span class="modal-back">&lt;</span>
<span class="mark-all-as-read"></span> <span class="mark-all-as-read"></span>
</div> </div>
<div class="modal-content"></div> <div class="modal-content"></div>

View File

@ -1343,6 +1343,8 @@ function initInterfaceCommon() {
closeModal(); closeModal();
}); });
$('.modal-back').on('click', function() {history.back();});
$('.prompt-close').on('click', function(e) { $('.prompt-close').on('click', function(e) {
e.stopPropagation(); e.stopPropagation();
closeModalHandler('.prompt-wrapper'); closeModalHandler('.prompt-wrapper');
@ -1460,6 +1462,9 @@ $(document).ready(function()
initInterfaceLogin(); initInterfaceLogin();
} else if (page.indexOf("network.html") === 0) { } else if (page.indexOf("network.html") === 0) {
initInterfaceNetwork(); initInterfaceNetwork();
} else if (page.indexOf('options.html') === 0) {
initInterfaceCommon();
$.Options.initControls();
} else if (page.indexOf("profile-edit.html") === 0) { } else if (page.indexOf("profile-edit.html") === 0) {
initProfileEdit(); initProfileEdit();
} }

View File

@ -777,7 +777,7 @@ function processSwarmProgressFinal(lastHaves, numPieces)
} }
} }
} }
window.setTimeout("requestSwarmProgress();",2000); window.setTimeout(requestSwarmProgress, 2000);
} }
function followingChangedUser() { function followingChangedUser() {

View File

@ -20,14 +20,6 @@
<script src="js/interface_login.js"></script> <script src="js/interface_login.js"></script>
<script src="js/polyglot.min.js"></script> <script src="js/polyglot.min.js"></script>
<script src="js/interface_localization.js"></script> <script src="js/interface_localization.js"></script>
<script>
$(function() {
initInterfaceCommon();
$.Options.initControls();
})
changeStyle();
</script>
</head> </head>
<body> <body>