Skip to content

Commit

Permalink
feat(google,ios): enable blocking for top / related news (#508)
Browse files Browse the repository at this point in the history
* feat(google): Enable blocking for top / related news

* show background of blocked/highlighted results

---------

Co-authored-by: iorate <682043+iorate@users.noreply.github.com>
  • Loading branch information
clvs7-gh and iorate authored Jul 15, 2024
1 parent 832f991 commit 5a86624
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/scripts/search-engines/google-mobile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const mobileSerpHandlers: Record<string, SerpHandler> = {
"": handleSerp({
globalStyle: {
...mobileGlobalStyle,
"[data-ub-blocked] .ZINbbc, [data-ub-highlight] .ZINbbc, [data-ub-blocked] .D9l01, [data-ub-highlight] .D9l01, .BmkBMc g-inner-card":
":is([data-ub-blocked], [data-ub-highlight]) :is(.ZINbbc, .D9l01, .y6CIle), .BmkBMc g-inner-card":
{
backgroundColor: "transparent !important",
},
Expand Down Expand Up @@ -268,6 +268,25 @@ const mobileSerpHandlers: Record<string, SerpHandler> = {
);
},
},
// Top / Related News
{
target: ".JJJtgd",
level: ".JJZKK",
url: "a",
title: ".pontCc > div",
actionTarget: ".JJJtgd",
actionPosition: "afterend",
actionStyle: {
fontSize: "12px",
lineHeight: "16px",
textAlign: "left",
marginBottom: "-6px",
paddingLeft: "8px !important",
...mobileRegularActionStyle,
...mobileActionClickable,
...iOSButtonStyle,
},
},
],
pagerHandlers: [
// iOS
Expand Down

0 comments on commit 5a86624

Please sign in to comment.