This commit is contained in:
Igor Zhukov 2014-05-12 18:52:01 +01:00
parent d85171e0b9
commit f7171d3a5f
2 changed files with 6 additions and 5 deletions

View File

@ -1,8 +1,8 @@
(function () { ;(function () {
// Prevent click-jacking // Prevent click-jacking
try { try {
if (window.chrome && chrome.app && chrome.app.window || self == top) { if (window == window.top || window.chrome && chrome.app && chrome.app.window) {
document.documentElement.style.display = 'block'; document.documentElement.style.display = 'block';
} else { } else {
top.location = self.location; top.location = self.location;

View File

@ -32,9 +32,10 @@ function dHexDump (bytes) {
} }
function bytesToHex (bytes) { function bytesToHex (bytes) {
bytes = bytes || [];
var arr = []; var arr = [];
for (var i = 0; i < bytes.length; i++) { for (var i = 0; i < bytes.length; i++) {
arr.push((bytes[i] < 16 ? '0' : '') + bytes[i].toString(16)); arr.push((bytes[i] < 16 ? '0' : '') + (bytes[i] || 0).toString(16));
} }
return arr.join(''); return arr.join('');
} }