Browse Source

Slight cleanup of CSS-JS injector.

pull/3202/head
TheGoddessInari 7 years ago
parent
commit
92e9218760
  1. 10
      app/ux/WebView.js

10
app/ux/WebView.js

@ -392,7 +392,7 @@ Ext.define('Rambox.ux.WebView',{
e.preventDefault(); e.preventDefault();
}); });
function JSapplyCSS() function JSApplyCSS()
{ {
if ( me.record ) { if ( me.record ) {
let custom_css_complex = me.record.get('custom_css_complex'); let custom_css_complex = me.record.get('custom_css_complex');
@ -473,12 +473,12 @@ Ext.define('Rambox.ux.WebView',{
webview.insertCSS(css_inject); webview.insertCSS(css_inject);
}); });
webview.addEventListener('load-commit', function(url, isMainFrame) { webview.addEventListener('load-commit', function() {
JSapplyCSS(); JSApplyCSS();
}); });
webview.addEventListener('did-frame-finish-load', function(event, isMainFrame, frameProcessId, frameRoutingId) { webview.addEventListener('did-frame-finish-load', function() {
JSapplyCSS(); JSApplyCSS();
}); });
webview.addEventListener('ipc-message', function(event) { webview.addEventListener('ipc-message', function(event) {

Loading…
Cancel
Save