Skip to content

Commit

Permalink
Merge pull request #170 from jspenguin2017/master
Browse files Browse the repository at this point in the history
v15.0.0.194
  • Loading branch information
LiCybora authored Mar 11, 2020
2 parents d1cad08 + 0a2d4a6 commit 73cbb24
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 7 deletions.
2 changes: 0 additions & 2 deletions list/3-rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,6 @@ amarujala.com##+js(abort-on-property-read.js, call_adblocker)
! === sportspyder.com
sportspyder.com##+js(setTimeout-defuser.js, BlockerChecker)
||sportspyder.com/assets/application-$script,badfilter
! === salon.com
@@||salon.com/combo/js$script,first-party
! === tvnow.de
tvnow.de##.no-flash-box:has-text(Adblocker)
! === kiss.com.tw
Expand Down
43 changes: 42 additions & 1 deletion src/content/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,24 @@ a.noAccessExt = (chain) => {

// ----------------------------------------------------------------------------------------------------------------- //

a.params = () => {
const url = new URL(document.location);
return url.searchParams;
};

a.redirectToParam = (key) => {
const params = a.params();
const href = params.get(key);
if (typeof href === "string") {
stop();
try {
location.href = href;
} catch (err) {
console.error("[Nano] Failed :: Redirect To Param");
}
}
};

// Omit value to get cookie
a.cookie = (key, val, time = 31536000000, path = "/") => {
if (val === undefined) {
Expand Down Expand Up @@ -1375,7 +1393,30 @@ a.generic.Adfly = () => {
},
});
} catch (err) {
window.console.error("[Nano] Failed :: Adfly Bypasser");
window.console.error("[Nano] Failed :: Adfly Skipper");
}
});
};

a.generic.AdflyForcedNotification = () => {
// https://github.com/NanoAdblocker/NanoFilters/issues/370
a.ready(() => {
if (location.pathname === "/pushredirect/") {
const arrow = document.querySelector("body > div.arrow");
const logo = document.querySelector("body > div.logo-wrapper > img.logo");
if (arrow !== null && logo !== null) {
const params = a.params();
const site = params.get("site");
const dest = params.get("dest");
if (site === "adfly" && typeof dest === "string") {
stop();
try {
location.href = dest;
} catch (err) {
console.error("[Nano] Failed :: Adfly Forced Notification Blocker");
}
}
}
}
});
};
Expand Down
9 changes: 7 additions & 2 deletions src/content/rules-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,17 @@
// https://github.com/uBlockOrigin/uAssets/issues/6553
"cutlinks",
], true)) {
console.log("[Nano] Excluded :: Adfly Bypasser");
console.log("[Nano] Excluded :: Adfly Skipper");
} else {
a.generic.Adfly();
}

if (false) {
console.log("[Nano] Excluded :: Adfly Forced Notification Blocker");
} else {
a.generic.AdflyForcedNotification();
}

if (false) {
console.log("[Nano] Excluded :: app_vars Defuser");
} else {
Expand Down Expand Up @@ -325,7 +331,6 @@ if (a.domCmp([
"flashx.to",
"flashx.tv",
"linx.cloud",
"salon.com",
"urle.co",
"usapoliticstoday.com",
"vidlox.tv",
Expand Down
23 changes: 23 additions & 0 deletions src/content/rules-specific.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,29 @@ if (a.domCmp([
a.filter("open");
}

// https://github.com/NanoAdblocker/NanoFilters/issues/370
if (a.domCmp([
"news-fbe.com",
])) {
a.redirectToParam("url");
}

// https://github.com/NanoAdblocker/NanoFilters/issues/370
if (a.domCmp([
"ouo.today",
])) {
const params = a.params();
const href = params.get("cr");
if (typeof href === "string") {
stop();
try {
location.href = atob(href);
} catch (err) {
console.error("[Nano] Failed :: Specific Solution");
}
}
}

// ----------------------------------------------------------------------------------------------------------------- //

// Unbreak for Chromium built-in adblocker
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"webRequest",
"webRequestBlocking"
],
"version": "15.0.0.190",
"version": "15.0.0.194",
"web_accessible_resources": [
"resources/*"
]
Expand Down
1 change: 0 additions & 1 deletion uBlockProtectorList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ amarujala.com##+js(abort-on-property-read.js, call_adblocker)
||oddreaders.com/wp-content/plugins/sociallocker-next-premium/
sportspyder.com##+js(setTimeout-defuser.js, BlockerChecker)
||sportspyder.com/assets/application-$script,badfilter
@@||salon.com/combo/js$script,first-party
tvnow.de##.no-flash-box:has-text(Adblocker)
kiss.com.tw#@##ads
igeeksblog.com###quads-ad1_widget
Expand Down

0 comments on commit 73cbb24

Please sign in to comment.