var done_print = false;
var do_print = function(web_frame) {
+ var queue_print = 0;
- if (done_print) {
- print("do_print called -- while already doing this...");
- return;
- }
- done_print = true;
- print("do_print called");
-
-
- TabbedBrowser.browser.current_tab().get_web_view().execute_script(
- File.read( __script_path__ + "/domains/remove_print_css.js")
- );
-
- var url_p = current_url.split('/');
- var dom = url_p[2];
- var dom_p = url_p[2].split('.');
- var chk = dom_p.pop();
- chk = dom_p.pop() + '.' + chk;
-
-
-
- print("CHECK: " + chk +"\n");
- if (File.exists( __script_path__ + "/domains/" + chk + '.js')) {
- print("INCLUDING: " + __script_path__ + "/domains/"+ chk + ".js\n");
- TabbedBrowser.browser.current_tab().get_web_view().execute_script(
- File.read( __script_path__ + "/domains/"+ chk + ".js")
- );
- }
-
-
- // motorme - requires a scroll to make content appear..
- if (current_url.match(/\.motorme\.my\//) ) {
- TabbedBrowser.browser.current_tab().get_web_view().execute_script("window.scrollTo(0,500);");
-
- }
-
- if (current_url.match('/forbes.com')) {
- v
- }
-
-
- print("Delay:" + BrowserSettings.delay);
-
-
var realprint = function() {
try {
}
};
+
+
+ if (done_print) {
+ print("do_print called -- while already doing this...");
+ return;
+ }
+ done_print = true;
+ print("do_print called");
+
+
+ TabbedBrowser.browser.current_tab().get_web_view().execute_script(
+ File.read( __script_path__ + "/domains/remove_print_css.js")
+ );
+
+ var url_p = current_url.split('/');
+ var dom = url_p[2];
+ var dom_p = url_p[2].split('.');
+ var chk = dom_p.pop();
+ chk = dom_p.pop() + '.' + chk;
+
+
+
+ print("CHECK: " + chk +"\n");
+ if (File.exists( __script_path__ + "/domains/" + chk + '.js')) {
+ print("INCLUDING: " + __script_path__ + "/domains/"+ chk + ".js\n");
+ TabbedBrowser.browser.current_tab().get_web_view().execute_script(
+ File.read( __script_path__ + "/domains/"+ chk + ".js")
+ );
+ }
+
+
+ // motorme - requires a scroll to make content appear..
+ if (current_url.match(/\.motorme\.my\//) ) {
+ TabbedBrowser.browser.current_tab().get_web_view().execute_script("window.scrollTo(0,500);");
+
+ }
+
+ if (current_url.match('/forbes.com')) {
+ v
+ }
+
+
+ print("Delay:" + BrowserSettings.delay);
+
+
GLib.timeout_add(GLib.PRIORITY_DEFAULT, BrowserSettings.delay *1, realprint);
}