636 |
636 |
637 def __updateMatcher(self): |
637 def __updateMatcher(self): |
638 """ |
638 """ |
639 Private slot to update the adblock matcher. |
639 Private slot to update the adblock matcher. |
640 """ |
640 """ |
|
641 from WebBrowser.WebBrowserWindow import WebBrowserWindow |
|
642 WebBrowserWindow.networkManager().removeUrlInterceptor( |
|
643 self.__interceptor) |
|
644 |
641 if self.__enabled: |
645 if self.__enabled: |
642 self.__matcher.update() |
646 self.__matcher.update() |
643 else: |
647 else: |
644 self.__matcher.clear() |
648 self.__matcher.clear() |
|
649 |
|
650 WebBrowserWindow.networkManager().installUrlInterceptor( |
|
651 self.__interceptor) |
645 |
652 |
646 def __canBeBlocked(self, url): |
653 def __canBeBlocked(self, url): |
647 """ |
654 """ |
648 Private method to check, if the given URL could be blocked (i.e. is |
655 Private method to check, if the given URL could be blocked (i.e. is |
649 not whitelisted). |
656 not whitelisted). |