Browse Source

Bugfixes

master
Igor Zhukov 10 years ago
parent
commit
f7171d3a5f
  1. 4
      app/js/init.js
  2. 3
      app/js/lib/mtproto.js

4
app/js/init.js

@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
(function () {
;(function () {
// Prevent click-jacking
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';
} else {
top.location = self.location;

3
app/js/lib/mtproto.js

@ -32,9 +32,10 @@ function dHexDump (bytes) { @@ -32,9 +32,10 @@ function dHexDump (bytes) {
}
function bytesToHex (bytes) {
bytes = bytes || [];
var arr = [];
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('');
}

Loading…
Cancel
Save