Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jspenguin2017 committed May 6, 2018
1 parent 574907b commit c0aa895
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
23 changes: 17 additions & 6 deletions src/background/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,23 @@ a.init = () => {
*/
case "inject css":
if (args[1].tab && args[1].tab.id !== chrome.tabs.TAB_ID_NONE) {
chrome.tabs.insertCSS(args[1].tab.id, {
code: args[0]["data"],
frameId: args[1].frameId || 0,
}, () => {
void chrome.runtime.lastError;
});
// TODO: Clean this up when minimum required version of Chrome is 66 or higher
try {
chrome.tabs.insertCSS(args[1].tab.id, {
code: args[0]["data"],
frameId: args[1].frameId || 0,
cssOrigin: "user",
}, () => {
void chrome.runtime.lastError;
});
} catch (err) {
chrome.tabs.insertCSS(args[1].tab.id, {
code: args[0]["data"],
frameId: args[1].frameId || 0,
}, () => {
void chrome.runtime.lastError;
});
}
}
break;

Expand Down
6 changes: 6 additions & 0 deletions src/content/rules-specific.js
Original file line number Diff line number Diff line change
Expand Up @@ -3079,6 +3079,12 @@ if (a.domCmp(["boost.ink"])) {
});
}

// Nano Adblocker does not support UserCSS because it breaks DOM Inspector, duct tape it here
// TODO: Convert to filter (or remove if already in uAssets) when minimum required version of Chrome is 66 or higher
if (a.domCmp(["hdblog.it", "hdmotori.it"])) {
a.css("body { background:none; overflow:auto;}");
}

// >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>
//Partially working
if (a.domCmp(["hulu.com"])) {
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@
"webRequest",
"webRequestBlocking"
],
"version": "14.7"
"version": "14.8"
}

0 comments on commit c0aa895

Please sign in to comment.