From d0d3d4f1173a5718bdefcecac93a7c41a907f46b Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 14 Apr 2016 13:56:41 +0800 Subject: [PATCH] BrowserView.js --- BrowserView.js | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/BrowserView.js b/BrowserView.js index f1e60c1..bb40012 100644 --- a/BrowserView.js +++ b/BrowserView.js @@ -291,38 +291,12 @@ BrowserView = new GType({ print("CHECK: " + chk +"\n"); - - if (current_url.match(/\.coconuts\.co\//) ) { - TabbedBrowser.browser.current_tab().get_web_view().execute_script( - File.read( __script_path__ + "/domains/coconuts.co.js") - ); - - } - if (current_url.match(/\.itnewsafrica\.com\//) ) { - TabbedBrowser.browser.current_tab().get_web_view().execute_script( - File.read( __script_path__ + "/domains/itnewsafrica.com.js") - ); - } - if (current_url.match(/\.indiatimes\.com\//) ) { - print("running indiatimes code"); - TabbedBrowser.browser.current_tab().get_web_view().execute_script( - File.read( __script_path__ + "/domains/indiatimes.com.js") - ); - } - - if (current_url.match(/\.inquirer\.net\//) ) { - print("add inquirer.net code"); - TabbedBrowser.browser.current_tab().get_web_view().execute_script( - File.read( __script_path__ + "/domains/inquirer.net.js") - ); - - } - if (current_url.match(/\.puntocellulare\.it\//) ) { + if (File.exists( __script_path__ + "/domains/" + chk + '.js')) { TabbedBrowser.browser.current_tab().get_web_view().execute_script( - File.read( __script_path__ + "/domains/puntocellulare.it.js") + File.read( __script_path__ + "/domains/"+ chk + ".js") ); - } + // motorme - requires a scroll to make content appear.. if (current_url.match(/\.motorme\.my\//) ) { @@ -330,11 +304,7 @@ BrowserView = new GType({ } - if (current_url.match(/\.efytimes\.com\//) || current_url.match(/\/efytimes\.com\//) ) { - TabbedBrowser.browser.current_tab().get_web_view().execute_script( - File.read( __script_path__ + "/domains/efytimes.com.js") - ); - } + print("Delay:" + BrowserSettings.delay); -- 2.39.2