-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a MVP version of uBOLite for Firefox
What does not work at the time of commit: Cosmetic filtering does not work: The content scripts responsible for cosmetic filtering fail when trying to inject the stylesheets through document.adoptedStyleSheets, with the following error message: XrayWrapper denied access to property Symbol.iterator (reason: object is not safely Xrayable). See https://developer.mozilla.org/en-US/docs/Xray_vision for more information. ... css-declarative.js:106:8 A possible solution is to inject those content scripts in the MAIN world. However Firefox scripting API does not support MAIN world injection at the moment. Scriptlet-filtering does not work: Because scriptlet code needs to be injected in the MAIN world, and this is currently not supported by Firefox's scripting API, see https://bugzilla.mozilla.org/show_bug.cgi?id=1736575 There is no count badge on the toolbar icon in Firefox, as it currently does not support the `DNR.setExtensionActionOptions` method. Other than the above issues, it does appear uBO is blocking properly with no error reported in the dev console. The adoptedStyleSheets issue though is worrisome, as the cosmetic filtering content scripts were designed with ISOLATED world injection in mind. Being forced to inject in MAIN world (when available) make things a bit more complicated as uBO has to ensure it's global variables do not leak into the page.
- Loading branch information
Showing
12 changed files
with
124 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>uBlock Origin Background Page</title> | ||
</head> | ||
<body> | ||
<script src="js/background.js" type="module"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"action": { | ||
"default_icon": { | ||
"16": "img/icon_16.png", | ||
"32": "img/icon_32.png", | ||
"64": "img/icon_64.png" | ||
}, | ||
"default_popup": "popup.html" | ||
}, | ||
"author": "Raymond Hill", | ||
"background": { | ||
"page": "background.html" | ||
}, | ||
"browser_specific_settings": { | ||
"gecko": { | ||
"id": "uBOLite@raymondhill.net", | ||
"strict_min_version": "113a1" | ||
} | ||
}, | ||
"declarative_net_request": { | ||
"rule_resources": [ | ||
] | ||
}, | ||
"default_locale": "en", | ||
"description": "__MSG_extShortDesc__", | ||
"icons": { | ||
"16": "img/icon_16.png", | ||
"32": "img/icon_32.png", | ||
"64": "img/icon_64.png", | ||
"128": "img/icon_128.png" | ||
}, | ||
"manifest_version": 3, | ||
"name": "__MSG_extName__", | ||
"options_ui": { | ||
"page": "dashboard.html" | ||
}, | ||
"optional_permissions": [ | ||
"<all_urls>" | ||
], | ||
"permissions": [ | ||
"activeTab", | ||
"declarativeNetRequest", | ||
"scripting" | ||
], | ||
"short_name": "uBO Lite", | ||
"version": "0.1", | ||
"web_accessible_resources": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters