|
|
@ -137,12 +137,17 @@ Ext.define('Rambox.ux.WebView',{ |
|
|
|
if ( me.notifications ) me.setNotifications(me.notifications); |
|
|
|
if ( me.notifications ) me.setNotifications(me.notifications); |
|
|
|
|
|
|
|
|
|
|
|
// Injected code to detect new messages
|
|
|
|
// Injected code to detect new messages
|
|
|
|
if ( me.record && me.record.get('js_unread') !== '' ) { |
|
|
|
if ( me.record ) { |
|
|
|
console.info('JS Injected to Detect New Messages', me.src); |
|
|
|
|
|
|
|
var js_unread = Ext.getStore('ServicesList').getById(me.record.get('type') === 'office365' ? 'outlook365' : me.record.get('type')).get('js_unread'); |
|
|
|
var js_unread = Ext.getStore('ServicesList').getById(me.record.get('type') === 'office365' ? 'outlook365' : me.record.get('type')).get('js_unread'); |
|
|
|
|
|
|
|
js_unread = me.type === 'custom' ? me.record.get('js_unread') : js_unread; |
|
|
|
|
|
|
|
if ( js_unread !== '' ) { |
|
|
|
|
|
|
|
console.groupCollapsed('JS Injected to Detect New Messages'); |
|
|
|
|
|
|
|
console.info(me.type); |
|
|
|
console.log(js_unread); |
|
|
|
console.log(js_unread); |
|
|
|
|
|
|
|
console.groupEnd() |
|
|
|
webview.executeJavaScript(js_unread); |
|
|
|
webview.executeJavaScript(js_unread); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Scroll always to top (bug)
|
|
|
|
// Scroll always to top (bug)
|
|
|
|
webview.executeJavaScript('document.body.scrollTop=0;'); |
|
|
|
webview.executeJavaScript('document.body.scrollTop=0;'); |
|
|
|