summaryrefslogtreecommitdiff
path: root/overrides
diff options
context:
space:
mode:
authorRory MacQueen <rorymacqueen@gmail.com>2014-07-14 11:27:38 -0700
committerRory MacQueen <rorymacqueen@gmail.com>2014-07-14 11:27:38 -0700
commit159fa5bd7b25cd659cebb03cd481501651eeefa6 (patch)
treec816286231e5408f08cbdfe022d8cf4a77e47902 /overrides
parentd2368ae7095c92ad489accdca587d9ce2d7efb62 (diff)
Revert "Inject CSS at the committed event"
This reverts commit de53c768b7315bfdd884871eb6f2699dbf0d9634.
Diffstat (limited to 'overrides')
-rw-r--r--overrides/endless_private/injectable_webview.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/overrides/endless_private/injectable_webview.js b/overrides/endless_private/injectable_webview.js
index 41772d7..9cf30b5 100644
--- a/overrides/endless_private/injectable_webview.js
+++ b/overrides/endless_private/injectable_webview.js
@@ -38,7 +38,7 @@ const InjectableWebview = new Lang.Class({
*/
inject_js_from_resource: function (js_uri) {
let js_str = this._read_gresource_file(js_uri);
- this._run_js_on_loaded_page(js_str, WebKit2.LoadEvent.FINISHED);
+ this._run_js_on_loaded_page(js_str);
},
/**
@@ -64,7 +64,7 @@ const InjectableWebview = new Lang.Class({
].join('\n').replace('CSS_TEXT', css_str.toSource());
// exec the javascript
- this._run_js_on_loaded_page(inject_css_script, WebKit2.LoadEvent.COMMITTED);
+ this._run_js_on_loaded_page(inject_css_script);
},
/**
@@ -90,12 +90,12 @@ const InjectableWebview = new Lang.Class({
// javascript on the page. Also attach a handler to run the javascript
// whenever the webview's load-changed indicates it's finished loading
// something
- _run_js_on_loaded_page: function (script, event) {
+ _run_js_on_loaded_page: function (script) {
if (this.uri !== null && !this.is_loading) {
this.run_javascript(script, null, null);
}
let handler = this.connect('load-changed', function (webview, status) {
- if (status == event) {
+ if (status == WebKit2.LoadEvent.FINISHED) {
this.run_javascript(script, null, null);
}
}.bind(this));