From 1753566bd280e4729ca1c80643ef4fb646629338 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Fri, 20 Mar 2020 14:46:46 +0800 Subject: [PATCH] Fix issue #248 --- core/browser.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/browser.py b/core/browser.py index d6810dc..0e89b44 100644 --- a/core/browser.py +++ b/core/browser.py @@ -460,11 +460,13 @@ class BrowserBuffer(Buffer): # Emacs-china forum thread don't need draw background that avoid flash. if self.dark_mode_is_enable(): - if self.current_url.startswith("https://emacs-china.org/t/") and self.request_url.startswith("https://emacs-china.org/t/"): - current_urls = self.current_url.rsplit("/", 1) - request_urls = self.request_url.rsplit("/", 1) + current_urls = self.current_url.rsplit("/", 1) + request_urls = self.request_url.rsplit("/", 1) + if self.current_url.startswith("https://emacs-china.org/t/") and self.request_url.startswith("https://emacs-china.org/t/"): self.no_need_draw_background = current_urls[0] == request_urls[0] or self.request_url == current_urls[0] + elif self.current_url.startswith("https://livebook.manning.com/book/") and self.request_url.startswith("https://livebook.manning.com/book/"): + self.no_need_draw_background = current_urls[0] == request_urls[0] elif self.current_url.startswith("https://web.telegram.org") and self.request_url.startswith("https://web.telegram.org"): self.no_need_draw_background = True