BrowserView.js
authorAlan Knowles <alan@roojs.com>
Thu, 14 Apr 2016 05:56:41 +0000 (13:56 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 14 Apr 2016 05:56:41 +0000 (13:56 +0800)
BrowserView.js

index f1e60c1..bb40012 100644 (file)
@@ -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);