|
|
|
|
@ -821,26 +821,29 @@ class BrowserBuffer(Buffer): |
|
|
|
|
elif progress == 100 and self.draw_progressbar: |
|
|
|
|
self.init_auto_fill() |
|
|
|
|
self.buffer_widget.eval_js(self.buffer_widget.marker_js.replace("%1", self.emacs_var_dict["eaf-marker-letters"])) |
|
|
|
|
|
|
|
|
|
cursor_foreground_color = "" |
|
|
|
|
cursor_background_color = "" |
|
|
|
|
|
|
|
|
|
if self.dark_mode_is_enable(): |
|
|
|
|
if self.emacs_var_dict["eaf-browser-dark-mode"] == "follow": |
|
|
|
|
self.caret_browsing_js = self.buffer_widget.caret_browsing_js_raw.replace("%1", "#"+ str(hex(self.caret_background_color.red()//16)).replace("0x","")+ \ |
|
|
|
|
str(hex(self.caret_background_color.green()//16)).replace("0x","")+ \ |
|
|
|
|
str(hex(self.caret_background_color.blue()//16)).replace("0x","")).replace("%2", "#"+ str(hex(self.caret_foreground_color.red()//16)).replace("0x","")+ \ |
|
|
|
|
str(hex(self.caret_foreground_color.green()//16)).replace("0x","")+ \ |
|
|
|
|
str(hex(self.caret_foreground_color.blue()//16)).replace("0x","")) |
|
|
|
|
cursor_foreground_color = self.caret_background_color.name() |
|
|
|
|
cursor_background_color = self.caret_foreground_color.name() |
|
|
|
|
else: |
|
|
|
|
self.caret_browsing_js = self.buffer_widget.caret_browsing_js_raw.replace("%1", "#FFF").replace("%2", "#000") |
|
|
|
|
cursor_foreground_color = "#FFF" |
|
|
|
|
cursor_background_color = "#000" |
|
|
|
|
else: |
|
|
|
|
if self.emacs_var_dict["eaf-browser-dark-mode"] == "follow": |
|
|
|
|
self.caret_browsing_js = self.buffer_widget.caret_browsing_js_raw.replace("%1", "#"+ str(hex(self.caret_background_color.red()//16)).replace("0x","") + \ |
|
|
|
|
str(hex(self.caret_background_color.green()//16)).replace("0x","")+ \ |
|
|
|
|
str(hex(self.caret_background_color.blue()//16)).replace("0x","")).replace("%2", "#"+ str(hex(self.caret_foreground_color.red()//16)).replace("0x","")+ \ |
|
|
|
|
str(hex(self.caret_foreground_color.green()//16)).replace("0x","")+ \ |
|
|
|
|
str(hex(self.caret_foreground_color.blue()//16)).replace("0x","")) |
|
|
|
|
cursor_foreground_color = self.caret_background_color.name() |
|
|
|
|
cursor_background_color = self.caret_foreground_color.name() |
|
|
|
|
else: |
|
|
|
|
self.caret_browsing_js = self.buffer_widget.caret_browsing_js_raw.replace("%1", "#000").replace("%2", "#FFF") |
|
|
|
|
cursor_foreground_color = "#000" |
|
|
|
|
cursor_background_color = "#FFF" |
|
|
|
|
|
|
|
|
|
self.caret_browsing_js = self.buffer_widget.caret_browsing_js_raw.replace("%1", cursor_foreground_color).replace("%2", cursor_background_color) |
|
|
|
|
self.buffer_widget.eval_js(self.caret_browsing_js) |
|
|
|
|
self.eval_caret_js = True |
|
|
|
|
|
|
|
|
|
if self.emacs_var_dict["eaf-browser-enable-adblocker"] == "true": |
|
|
|
|
self.buffer_widget.load_adblocker() |
|
|
|
|
if self.dark_mode_is_enable(): |
|
|
|
|
|