diff --git a/src/scripts/search-engines/google-desktop.ts b/src/scripts/search-engines/google-desktop.ts index 2c167d920..49e47832e 100644 --- a/src/scripts/search-engines/google-desktop.ts +++ b/src/scripts/search-engines/google-desktop.ts @@ -243,6 +243,28 @@ const desktopSerpHandlers: Record = { title: (root) => root.querySelector("h3")?.textContent ?? null, ...regularEntryHandler, }, + // Questions & answers + { + target: ".Hb5Kgc > .m9wSUc", + level: ".Tpb3kb > .BmkBMc", + url: "a", + title: ".RqlTSb", + actionTarget: ".m9wSUc", + actionPosition: "afterend", + actionStyle: (actionRoot) => { + actionRoot.className = css({ + ...desktopActionStyle, + display: "inline-block", + fontSize: "14px", + paddingLeft: "4px", + }); + actionRoot.previousElementSibling?.classList.add( + css({ + display: "inline-block !important", + }), + ); + }, + }, // Quote in the News { target: ".UaDxmd > .F4CzCf", diff --git a/src/scripts/search-engines/google-mobile.ts b/src/scripts/search-engines/google-mobile.ts index 0127c7c08..7b2658d93 100644 --- a/src/scripts/search-engines/google-mobile.ts +++ b/src/scripts/search-engines/google-mobile.ts @@ -105,7 +105,7 @@ const mobileSerpHandlers: Record = { "": handleSerp({ globalStyle: { ...mobileGlobalStyle, - "[data-ub-blocked] .ZINbbc, [data-ub-highlight] .ZINbbc, [data-ub-blocked] .D9l01, [data-ub-highlight] .D9l01": + "[data-ub-blocked] .ZINbbc, [data-ub-highlight] .ZINbbc, [data-ub-blocked] .D9l01, [data-ub-highlight] .D9l01, .BmkBMc g-inner-card": { backgroundColor: "transparent !important", }, @@ -238,6 +238,31 @@ const mobileSerpHandlers: Record = { actionTarget: "", actionStyle: mobileRegularActionStyle, }, + // Questions & answers + { + target: ".Hb5Kgc > .m9wSUc", + level: ".Tpb3kb > .BmkBMc", + url: "a", + title: ".RqlTSb", + actionTarget: ".m9wSUc", + actionPosition: "afterend", + actionStyle: (actionRoot) => { + actionRoot.className = css({ + "&::before": { + content: '" ยท "', + }, + display: "inline-block", + fontSize: "14px", + paddingLeft: "4px", + ...iOSButtonStyle, + }); + actionRoot.previousElementSibling?.classList.add( + css({ + display: "inline-block !important", + }), + ); + }, + }, ], pagerHandlers: [ // iOS