Browse Source

Update 2017-12-08T20:42:19.943Z

gh-pages
Igor Zhukov 7 years ago
parent
commit
2f1e29ece6
  1. 2
      index.html
  2. 47
      js/app.js
  3. 2
      js/background.js
  4. 2
      js/lib/bin_utils.js
  5. 2
      js/lib/crypto_worker.js
  6. 35
      js/lib/polyfill.js
  7. 2
      manifest.json
  8. 2
      manifest.webapp
  9. 4
      service_worker.js
  10. 2
      webogram.appcache

2
index.html

@ -1 +1 @@
<!doctype html><html lang=en manifest=webogram.appcache ng-csp xmlns:ng=http://angularjs.org id=ng-app style="display: none;"><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=manifest href=manifest.webapp.json><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 name=theme-color content=#497495><meta name=google content=notranslate><meta property=og:title content="Telegram Web"><meta property=og:url content="https://web.telegram.org/"><meta property=og:image content=https://web.telegram.org/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 style="display: none;"><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=manifest href=manifest.webapp.json><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 name=theme-color content=#497495><meta name=google content=notranslate><meta property=og:title content="Telegram Web"><meta property=og:url content="https://web.telegram.org/"><meta property=og:image content=https://web.telegram.org/img/logo_share.png><meta property=og:site_name content="Telegram Web"><meta property=description content="Welcome to the Web application of Telegram messenger. See https://github.com/zhukov/webogram for more info."><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>

47
js/app.js

File diff suppressed because one or more lines are too long

2
js/background.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.6.0 - messaging web application for MTProto * Webogram v0.6.1 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

2
js/lib/bin_utils.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.6.0 - messaging web application for MTProto * Webogram v0.6.1 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

2
js/lib/crypto_worker.js

@ -1,5 +1,5 @@
/*! /*!
* Webogram v0.6.0 - messaging web application for MTProto * Webogram v0.6.1 - messaging web application for MTProto
* https://github.com/zhukov/webogram * https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com> * Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE * https://github.com/zhukov/webogram/blob/master/LICENSE

35
js/lib/polyfill.js

@ -104,19 +104,38 @@ if (!Function.prototype.bind) {
/* setZeroTimeout polyfill, from http://dbaron.org/log/20100309-faster-timeouts */ /* setZeroTimeout polyfill, from http://dbaron.org/log/20100309-faster-timeouts */
(function (global) { (function (global) {
var timeouts = []
var messageName = 'zero-timeout-message' var messageName = 'zero-timeout-message'
var originalSetTimeout = global.setTimeout
var originalClearTimeout = global.clearTimeout
var originalMinId = originalSetTimeout(function () {}, 0)
var zeroTimeouts = []
var zeroMinId = originalMinId + 100000000
function setZeroTimeout (fn) { function setZeroTimeout (fn) {
timeouts.push(fn) var timeoutId = ++zeroMinId
zeroTimeouts.push([timeoutId, fn])
global.postMessage(messageName, '*') global.postMessage(messageName, '*')
return timeoutId
}
function clearZeroTimeout(timeoutId) {
if (timeoutId && timeoutId >= zeroMinId) {
for (var i = 0, len = zeroTimeouts.length; i < len; i++) {
if (zeroTimeouts[i][0] == timeoutId) {
console.warn('spliced timeout', timeoutId, i)
zeroTimeouts.splice(i, 1)
break
}
}
}
} }
function handleMessage (event) { function handleMessage (event) {
if (event.source == global && event.data == messageName) { if (event.source == global && event.data == messageName) {
event.stopPropagation() event.stopPropagation()
if (timeouts.length > 0) { if (zeroTimeouts.length > 0) {
var fn = timeouts.shift() var fn = zeroTimeouts.shift()[1]
fn() fn()
} }
} }
@ -124,7 +143,6 @@ if (!Function.prototype.bind) {
global.addEventListener('message', handleMessage, true) global.addEventListener('message', handleMessage, true)
var originalSetTimeout = global.setTimeout
global.setTimeout = function (callback, delay) { global.setTimeout = function (callback, delay) {
if (!delay || delay <= 5) { if (!delay || delay <= 5) {
return setZeroTimeout(callback) return setZeroTimeout(callback)
@ -132,5 +150,12 @@ if (!Function.prototype.bind) {
return originalSetTimeout(callback, delay) return originalSetTimeout(callback, delay)
} }
global.clearTimeout = function (timeoutId) {
if (timeoutId >= zeroMinId) {
clearZeroTimeout(timeoutId)
}
return originalClearTimeout(timeoutId)
}
global.setZeroTimeout = setZeroTimeout global.setZeroTimeout = setZeroTimeout
})(this) })(this)

2
manifest.json

@ -1,7 +1,7 @@
{ {
"name": "Telegram", "name": "Telegram",
"description": "Telegram Web App.\nMore info & source code here: https://github.com/zhukov/webogram", "description": "Telegram Web App.\nMore info & source code here: https://github.com/zhukov/webogram",
"version": "0.6.0", "version": "0.6.1",
"short_name": "Telegram", "short_name": "Telegram",
"manifest_version": 2, "manifest_version": 2,
"app": { "app": {

2
manifest.webapp

@ -1,7 +1,7 @@
{ {
"name": "Telegram", "name": "Telegram",
"description": "Telegram Web App.\nMore info & source code here: https://github.com/zhukov/webogram", "description": "Telegram Web App.\nMore info & source code here: https://github.com/zhukov/webogram",
"version": "0.6.0", "version": "0.6.1",
"type": "privileged", "type": "privileged",
"launch_path": "/index.html", "launch_path": "/index.html",
"developer": { "developer": {

4
service_worker.js

File diff suppressed because one or more lines are too long

2
webogram.appcache

@ -94,4 +94,4 @@ http://*
https://* https://*
* *
# hash: b351db81dc4eeecb76850c6e23a69413d0ab8e3af3dc79648fca991cd20a50a1 # hash: 8e8f8a2c296c4416198dfc2289cb1a7b6c14c1e0cba255b7da6786bcbc2c3670
Loading…
Cancel
Save