Skip to content

Commit

Permalink
browser: update with the latest set_emacs_var
Browse files Browse the repository at this point in the history
Signed-off-by: Mingde (Matthew) Zeng <[email protected]>
  • Loading branch information
MatthewZMD committed Jul 13, 2020
1 parent 5f07c87 commit 0497217
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@ def toggle_adblocker(self):
''' Change adblocker status.'''
if self.buffer.emacs_var_dict["eaf-browser-enable-adblocker"] == "true":
self.buffer.emacs_var_dict["eaf-browser-enable-adblocker"] = "false"
self.buffer.set_emacs_var.emit("eaf-browser-enable-adblocker", "false")
self.buffer.set_emacs_var.emit("eaf-browser-enable-adblocker", "false", "true")
self.remove_css('adblocker',True)
self.buffer.message_to_emacs.emit("Successfully disabled adblocker!")
elif self.buffer.emacs_var_dict["eaf-browser-enable-adblocker"] == "false":
self.buffer.emacs_var_dict["eaf-browser-enable-adblocker"] = "true"
self.buffer.set_emacs_var.emit("eaf-browser-enable-adblocker", "true")
self.buffer.set_emacs_var.emit("eaf-browser-enable-adblocker", "true", "true")
self.load_adblocker()
self.buffer.message_to_emacs.emit("Successfully enabled adblocker!")

Expand Down

0 comments on commit 0497217

Please sign in to comment.