@ -417,21 +417,18 @@ Ext.define('Rambox.ux.WebView',{
var js _inject = '' ;
var js _inject = '' ;
var css _inject = '' ;
var css _inject = '' ;
let js _injected = false ;
// Injected code to detect new messages
// Injected code to detect new messages
if ( me . record ) {
if ( me . record ) {
let js _unread = Ext . getStore ( 'ServicesList' ) . getById ( me . record . get ( 'type' ) ) . get ( 'js_unread' ) ;
let js _unread = me . record . get ( 'js_unread' ) ;
js _unread += me . record . get ( 'js_unread' ) ;
if ( ! js _unread ) {
js _unread += Ext . getStore ( 'ServicesList' ) . getById ( me . record . get ( 'type' ) ) . get ( 'js_unread' ) ;
}
if ( js _unread !== '' ) {
if ( js _unread !== '' ) {
console . groupCollapsed ( me . record . get ( 'type' ) . toUpperCase ( ) + ' - JS Injected to Detect New Messages' ) ;
console . groupCollapsed ( me . record . get ( 'type' ) . toUpperCase ( ) + ' - JS Injected to Detect New Messages' ) ;
console . info ( me . type ) ;
console . info ( me . type ) ;
console . log ( js _unread ) ;
console . log ( js _unread ) ;
console . groupEnd ( ) ;
console . groupEnd ( ) ;
if ( ! js _injected ) {
js _inject += '{' + js _unread + '}' ;
js _injected = true ;
js _inject += '{' ;
}
js _inject += js _unread ;
}
}
let custom _js = Ext . getStore ( 'ServicesList' ) . getById ( me . record . get ( 'type' ) ) . get ( 'custom_js' ) ;
let custom _js = Ext . getStore ( 'ServicesList' ) . getById ( me . record . get ( 'type' ) ) . get ( 'custom_js' ) ;
custom _js += me . record . get ( 'custom_js' ) ;
custom _js += me . record . get ( 'custom_js' ) ;
@ -440,11 +437,7 @@ Ext.define('Rambox.ux.WebView',{
console . info ( me . type ) ;
console . info ( me . type ) ;
console . log ( custom _js ) ;
console . log ( custom _js ) ;
console . groupEnd ( ) ;
console . groupEnd ( ) ;
if ( ! js _injected ) {
js _inject += '{' + custom _js + '}' ;
js _injected = true ;
js _inject += '{' ;
}
js _inject += custom _js ;
}
}
const custom _css _complex = me . record . get ( 'custom_css_complex' ) ;
const custom _css _complex = me . record . get ( 'custom_css_complex' ) ;
if ( custom _css _complex === false ) {
if ( custom _css _complex === false ) {
@ -458,7 +451,6 @@ Ext.define('Rambox.ux.WebView',{
css _inject += custom _css ;
css _inject += custom _css ;
}
}
}
}
if ( js _injected ) js _inject += '}' ;
}
}
// Prevent Title blinking (some services have) and only allow when the title have an unread regex match: "(3) Title"
// Prevent Title blinking (some services have) and only allow when the title have an unread regex match: "(3) Title"