From 6d6cb84a885a8451e33b64bed99ad3a82a13efe6 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 13 Jul 2018 11:47:58 +0800 Subject: [PATCH] domains/remove_print_css.js --- domains/remove_print_css.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/domains/remove_print_css.js b/domains/remove_print_css.js index 990dd0f..ac136ce 100644 --- a/domains/remove_print_css.js +++ b/domains/remove_print_css.js @@ -20,8 +20,12 @@ } // now we are dealing with non-print styles... - - var ar = document.styleSheets[ss].rules; + try { + var ar = document.styleSheets[ss].rules; + } catch(e) { + console.log("could not access stylesheet:" + ss); + continue; + } if (!ar) { del.push(node); continue; -- 2.39.2