Browse Source

merged with master

gh-pages
Igor Zhukov 11 years ago
parent
commit
5dcaa4ea14
  1. 2
      app.manifest
  2. 2
      css/app.css
  3. 2
      index.html
  4. 40
      js/app.js
  5. 46
      js/lib/bin_utils.js
  6. 5
      js/locales/en-us.json
  7. 2
      webogram.appcache

2
app.manifest

@ -1,5 +1,5 @@
CACHE MANIFEST
# Time: Mon Nov 17 2014 13:34:47 GMT+0300 (MSK)
# Time: Thu Nov 20 2014 01:17:11 GMT+0300 (MSK)
CACHE:

2
css/app.css

File diff suppressed because one or more lines are too long

2
index.html

@ -1 +1 @@
<!doctype html><html lang=en manifest=webogram.appcache ng-csp="" xmlns:ng=http://angularjs.org id=ng-app><head><meta charset=utf-8><meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"><title>Telegram Web</title><link rel=stylesheet href=css/app.css><link rel=icon href=favicon.ico type=image/x-icon><link rel=apple-touch-icon href=img/iphone_home120.png><link rel=apple-touch-icon sizes=120x120 href=img/iphone_home120.png><link rel=apple-touch-startup-image media="(device-width: 320px)" href=img/iphone_startup.png><meta name=apple-mobile-web-app-title content="Telegram Web"><meta name=mobile-web-app-capable content=yes><meta name=apple-mobile-web-app-capable content=yes><meta name=apple-mobile-web-app-status-bar-style content=black-translucent><meta property=og:title content="Telegram Web"><meta property=og:url content="http://zhukov.github.io/webogram/"><meta property=og:image content=http://zhukov.github.io/webogram/img/logo_share.png><meta property=og:site_name content="Telegram Web"><meta property=og:description content="Welcome to the Web application of Telegram messenger. See https://github.com/zhukov/webogram for more info."></head><body><div class=page_wrap ng-view=""></div><div id=notify_sound></div><script src=js/app.js></script></body></html>
<!doctype html><html lang=en manifest=webogram.appcache ng-csp xmlns:ng=http://angularjs.org id=ng-app><head><meta charset=utf-8><meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"><title>Telegram Web</title><link rel=stylesheet href=css/app.css><link rel=icon href=favicon.ico type=image/x-icon><link rel=apple-touch-icon href=img/iphone_home120.png><link rel=apple-touch-icon sizes=120x120 href=img/iphone_home120.png><link rel=apple-touch-startup-image media="(device-width: 320px)" href=img/iphone_startup.png><meta name=apple-mobile-web-app-title content="Telegram Web"><meta name=mobile-web-app-capable content=yes><meta name=apple-mobile-web-app-capable content=yes><meta name=apple-mobile-web-app-status-bar-style content=black-translucent><meta property=og:title content="Telegram Web"><meta property=og:url content="http://zhukov.github.io/webogram/"><meta property=og:image content=http://zhukov.github.io/webogram/img/logo_share.png><meta property=og:site_name content="Telegram Web"><meta property=og:description content="Welcome to the Web application of Telegram messenger. See https://github.com/zhukov/webogram for more info."></head><body><div class=page_wrap ng-view></div><div id=notify_sound></div><script src=js/app.js></script></body></html>

40
js/app.js

File diff suppressed because one or more lines are too long

46
js/lib/bin_utils.js

@ -92,6 +92,52 @@ function uint6ToBase64 (nUint6) {
: 65;
}
function base64ToBlob(base64str, mimeType) {
var sliceSize = 1024;
var byteCharacters = atob(base64str);
var bytesLength = byteCharacters.length;
var slicesCount = Math.ceil(bytesLength / sliceSize);
var byteArrays = new Array(slicesCount);
for (var sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex) {
var begin = sliceIndex * sliceSize;
var end = Math.min(begin + sliceSize, bytesLength);
var bytes = new Array(end - begin);
for (var offset = begin, i = 0 ; offset < end; ++i, ++offset) {
bytes[i] = byteCharacters[offset].charCodeAt(0);
}
byteArrays[sliceIndex] = new Uint8Array(bytes);
}
return blobConstruct(byteArrays, mimeType);
}
function dataUrlToBlob(url) {
// var name = 'b64blob ' + url.length;
// console.time(name);
var urlParts = url.split(',');
var base64str = urlParts[1];
var mimeType = urlParts[0].split(':')[1].split(';')[0];
var blob = base64ToBlob(base64str, mimeType);
// console.timeEnd(name);
return blob;
}
function blobConstruct (blobParts, mimeType) {
var blob;
try {
blob = new Blob(blobParts, {type: mimeType});
} catch (e) {
var bb = new BlobBuilder;
angular.forEach(blobParts, function(blobPart) {
bb.append(blobPart);
});
blob = bb.getBlob(mimeType);
}
return blob;
}
function bytesCmp (bytes1, bytes2) {
var len = bytes1.length;
if (len != bytes2.length) {

5
js/locales/en-us.json

@ -90,9 +90,12 @@
"user_name_deleted": "DELETED",
"user_first_name_deleted": "DELETED",
"user_status_offline": "offline",
"user_status_online": "online",
"user_status_last_seen": "last seen {0}",
"user_status_recently": "last seen recently",
"user_status_last_week": "last seen within a week",
"user_status_last_month": "last seen within a month",
"user_status_long_ago": "last seen a long time ago",
"chat_title_deleted": "DELETED",
"format_size_progress_mulitple": "{done} of {total} {parts}",
"format_size_progress": "{done} of {total}",

2
webogram.appcache

@ -1,5 +1,5 @@
CACHE MANIFEST
# Time: Mon Nov 17 2014 13:34:47 GMT+0300 (MSK)
# Time: Thu Nov 20 2014 01:17:11 GMT+0300 (MSK)
CACHE:

Loading…
Cancel
Save