From 76c0eed6a80bc3a5c91effd83c2241e9efc1879d Mon Sep 17 00:00:00 2001 From: Svit-personal Date: Mon, 30 Nov 2026 14:26:10 +0100 Subject: [PATCH] feat: Free Game Claimer 4.0 on its page - New "What's new in 4.0" section (id "whats-new", in the sidebar too): Epic's limited-time 100%-off sales, Epic's free Android and iPhone/iPad games, and captcha help. The extension's popup links to /free-game-claimer#whats-new. - Features, getting-started step 3, privacy and FAQ now cover the 100%-off sales, the mobile games and "Report a problem"; meta description (and with it the JSON-LD description) and llms.txt mention mobile games and sales. - ScrollToTop now opens a page at its #hash section instead of always at the top. Before, a visitor who gets a client render (Slovenian or dark mode saved) landed at the top of /free-game-claimer#faq. --- public/llms.txt | 2 +- src/assets/translations/en.json | 36 +++++++++++-------- src/assets/translations/sl.json | 36 +++++++++++-------- .../freeGameClaimer/FreeGameClaimer.tsx | 16 +++++++-- src/components/scroll-to-top/ScrollToTop.tsx | 13 ++++++- 5 files changed, 71 insertions(+), 32 deletions(-) diff --git a/public/llms.txt b/public/llms.txt index 21e1c5c..a903bf7 100644 --- a/public/llms.txt +++ b/public/llms.txt @@ -25,7 +25,7 @@ The site is available in English and Slovenian (add `?lang=sl` to a URL for Slov - [Digitalna Košarica](https://digitalna-kosarica.si/): price comparison website for Slovenian grocery stores, built with Spring Boot, PostgreSQL/TimescaleDB and Next.js - [Search Automatic Rewards](https://svitspindler.com/microsoft-automatic-rewards): Chrome and Firefox extension that automates daily Microsoft Rewards points, with Google's Featured badge ([source](https://github.com/spin311/MicrosoftRewardsWebsite)) - [Prolific Studies Notifier](https://svitspindler.com/prolific-studies-notifier): Chrome and Firefox extension that alerts users to new Prolific studies ([source](https://github.com/spin311/ProlificAutomaticStudies)) -- [Free Game Claimer](https://svitspindler.com/free-game-claimer): Chrome and Firefox extension that automatically claims free games from Epic, Steam, GOG, IndieGala and Prime Gaming; available in 7 languages ([source](https://github.com/spin311/epic-free-games-claim)) +- [Free Game Claimer](https://svitspindler.com/free-game-claimer): Chrome and Firefox extension that automatically claims free games from Epic (weekly PC and mobile giveaways, plus limited-time 100%-off sales), Steam, GOG, IndieGala and Prime Gaming; available in 7 languages ([source](https://github.com/spin311/epic-free-games-claim)) - [Gobar](https://juicevodka.github.io/Gobar/): mobile app that identifies mushrooms with an AI model; won "Best Carbon footprint reduction app" at DragonHack 2023 ([source](https://github.com/JuiceVodka/Gobar)) - [KeSi](https://juicevodka.github.io/KeSi/): Android location-guessing game similar to GeoGuessr, built at DragonHack 2024 with Kotlin ([source](https://github.com/JuiceVodka/KeSi)) - [ChatGPT prompt engineering](https://spin311.github.io/diploma/): website for a thesis experiment that compiles Python code alongside a ChatGPT chat; Java and HSQLDB backend on AWS ([source](https://github.com/spin311/hiter-inzeniring-diploma)) diff --git a/src/assets/translations/en.json b/src/assets/translations/en.json index a6b7308..8ae9896 100644 --- a/src/assets/translations/en.json +++ b/src/assets/translations/en.json @@ -223,27 +223,33 @@ }, "CLAIMER": { "meta_title": "Free Game Claimer: auto claim free Epic, Steam, GOG & Prime games", - "meta_description": "Free browser extension that claims free games from Epic Games, Steam, GOG, IndieGala and Prime Gaming automatically, using the store accounts you're already logged into. Open source, for Chrome and Firefox.", + "meta_description": "Free browser extension that automatically claims free games from Epic Games (PC and mobile, plus 100%-off sales), Steam, GOG, IndieGala and Prime Gaming, using the store accounts you're already logged into. Open source, for Chrome and Firefox.", "tagline": "Claims free games from Epic Games, Steam, GOG, IndieGala and Prime Gaming for you, on a schedule you choose.", "intro": "Stores give games away every week, but only to people who claim them in time. Free Game Claimer checks the stores you pick and claims each giveaway with the accounts you're already logged into in your browser. It never asks for your passwords.", "promo_alt": "Free Game Claimer popup listing this week's free games from Epic Games and Prime Gaming", + "whats_new_nav": "What's new", + "whats_new_title": "What's new in 4.0", + "new1": "Epic's 100%-off sales: besides Epic's weekly free games, it now also claims games that publishers put on sale at 100% off for a limited time. It's on by default (Limited-time 100%-off sales under Epic Games); Firefox asks once for access to store.epicgames.com.", + "new2": "Free mobile games from Epic: switch on Free Android games (worldwide) or Free iPhone and iPad games (EU only) under Epic Games, and it claims Epic's weekly free mobile games too. They go to your Epic library, ready to install from the Epic Games Store app on your phone. Both are off by default; the browser asks for access once when you turn one on.", + "new3": "Help with captchas: when Epic asks for a captcha, the claim tab comes to the front with a banner saying the claim finishes by itself once you solve it. The popup's warning has a Try again button.", "step1": "Add the extension to Chrome or Firefox (version 113 or newer) with the buttons at the top of this page.", "step2": "Stay logged in to the stores you want games from, in the same browser. Right after installing, it checks Epic Games and Steam and claims anything that's free, in background tabs that close by themselves.", - "step3": "Open the popup to choose your stores and when to check. Turning on GOG, IndieGala or Prime Gaming asks you to allow access to those sites.", + "step3": "Open the popup to choose your stores and when to check. Turning on GOG, IndieGala, Prime Gaming or Epic's free mobile games asks you to allow access to those sites.", "step4": "Pin the extension to the toolbar if you like. Its badge shows when it's claiming and when a store needs you.", "settings_caption": "Settings: pause auto-claim, pick when it checks, set a minimum Steam rating and see which stores you're logged in to.", "feature1": "Five stores: Epic Games and Steam are on by default. GOG, IndieGala and Prime Gaming are a click away.", - "feature2": "Your schedule: check on browser start, every hour, every 6 or 12 hours, or once a day at the hour you pick (the default is once a day). The Auto-claim switch pauses it, and Claim now checks right away.", - "feature3": "Free Games tab: every game that's free right now in your stores, when each giveaway ends, next week's Epic game, and an In library mark on games you already own on Steam or Epic.", - "feature4": "Steam rating filter: skip free Steam games rated below a level you choose, from 20%+ to 90%+ positive reviews.", - "feature5": "Prime Gaming: choose which offers to claim: Amazon Games, or games and codes for Epic, GOG, Microsoft Store and Legacy Games. Codes for GOG, Microsoft Store and Legacy Games are redeemed for you. Needs Amazon Prime.", - "feature6": "IndieGala: claims freebies and spins the daily Wheel of Fortune. A Steam key it wins is activated on your Steam account.", - "feature7": "No lost codes: a code or Steam key that can't be redeemed automatically, for example a region-locked key, waits in a Needs manual redeem list with a Copy button.", - "feature8": "Store status: the popup shows whether you're logged in to each store, and tells you when a store needs a captcha or has changed in a way the extension can't handle yet.", + "feature2": "More free Epic games: besides the weekly free games, it claims games that publishers put on sale at 100% off for a limited time (on by default) and, if you switch them on, Epic's weekly free mobile games for Android and for iPhone and iPad (EU only).", + "feature3": "Your schedule: check on browser start, every hour, every 6 or 12 hours, or once a day at the hour you pick (the default is once a day). The Auto-claim switch pauses it, and Claim now checks right away.", + "feature4": "Free Games tab: every game that's free right now in your stores, when each giveaway ends, next week's Epic game, and an In library mark on games you already own on Steam or Epic.", + "feature5": "Steam rating filter: skip free Steam games rated below a level you choose, from 20%+ to 90%+ positive reviews.", + "feature6": "Prime Gaming: choose which offers to claim: Amazon Games, or games and codes for Epic, GOG, Microsoft Store and Legacy Games. Codes for GOG, Microsoft Store and Legacy Games are redeemed for you. Needs Amazon Prime.", + "feature7": "IndieGala: claims freebies and spins the daily Wheel of Fortune. A Steam key it wins is activated on your Steam account.", + "feature8": "No lost codes: a code or Steam key that can't be redeemed automatically, for example a region-locked key, waits in a Needs manual redeem list with a Copy button.", + "feature9": "Store status: the popup shows whether you're logged in to each store, and explains what went wrong when a store needs a captcha or has changed in a way the extension can't handle yet. Report a problem opens a GitHub issue with the extension version, browser and store status already filled in (no account data).", "library_caption": "Free Games tab: when each giveaway ends, games already in your library and next week's free game.", "privacy1": "It uses the store accounts you're logged into in this browser. It never asks for your passwords and doesn't store them.", "privacy2": "There is no account, server, analytics or tracking. Settings and game lists stay in your browser's extension storage, and the extension only talks to the stores.", - "privacy3": "At install it asks for access to Steam and Epic Games. Access to GOG, IndieGala and the Prime Gaming sites (Amazon, plus the GOG, Microsoft and Legacy Games redeem pages) is only requested when you turn that store on.", + "privacy3": "At install it asks for access to Steam and Epic Games. Access to GOG, IndieGala, the Prime Gaming sites (Amazon, plus the GOG, Microsoft and Legacy Games redeem pages) and Epic's mobile store is only requested when you turn that store or option on. Firefox also asks once for access to store.epicgames.com, for Epic's 100%-off sales.", "privacy4": "It's free, with no ads or paid features, and open source under the GPL-3.0 licence. Read the code on GitHub.", "q1": "Why didn't it claim a game?", "a1": "Open the popup and check the store's status. The usual reasons: you're logged out of that store, Epic is showing a captcha (its tab is brought to the front for you to solve), the store is switched off, or the Steam rating filter skipped the game. Claim now tries again right away.", @@ -255,9 +261,11 @@ "a4": "As often as you choose: on browser start, every hour, every 6 or 12 hours, or once a day, which is the default. For the daily check you can pick an hour; if your browser is closed then, it runs when you next open it that day.", "q5": "Does it claim Epic's holiday mystery games?", "a5": "It claims every game that Epic's free games list shows as free, on your schedule. It has no special handling for the mystery games, so if one is missed, press Claim now or claim it on Epic's site.", - "q6": "Is it really free?", - "a6": "Yes. It has no ads, no paid tier and no premium features, and the code is open source. If it saves you money, you can support it below, but you never have to.", - "q7": "Is there a version for Microsoft Edge?", - "a7": "Not on Edge Add-ons yet, but Edge can install the Chrome version: open the Chrome Web Store link at the top of this page and allow extensions from other stores when Edge asks." + "q6": "Does it claim Epic's free mobile games?", + "a6": "Yes, since version 4.0. In the popup, switch on Free Android games or Free iPhone and iPad games (EU only) under Epic Games. They're claimed with the Epic account you're logged into in the browser and go to your Epic library, so you can install them from the Epic Games Store app on your phone.", + "q7": "Is it really free?", + "a7": "Yes. It has no ads, no paid tier and no premium features, and the code is open source. If it saves you money, you can support it below, but you never have to.", + "q8": "Is there a version for Microsoft Edge?", + "a8": "Not on Edge Add-ons yet, but Edge can install the Chrome version: open the Chrome Web Store link at the top of this page and allow extensions from other stores when Edge asks." } } diff --git a/src/assets/translations/sl.json b/src/assets/translations/sl.json index 534f539..c95c6f6 100644 --- a/src/assets/translations/sl.json +++ b/src/assets/translations/sl.json @@ -223,27 +223,33 @@ }, "CLAIMER": { "meta_title": "Free Game Claimer: samodejno prevzemanje brezplačnih iger z Epica, Steama, GOG-a in Prime", - "meta_description": "Brezplačna razširitev brskalnika, ki samodejno prevzema brezplačne igre z Epic Games, Steama, GOG-a, IndieGale in Prime Gaming, z računi, v katere ste že prijavljeni. Odprta koda, za Chrome in Firefox.", + "meta_description": "Brezplačna razširitev brskalnika, ki samodejno prevzema brezplačne igre z Epic Games (za računalnik in telefon ter 100-odstotno znižane igre), Steama, GOG-a, IndieGale in Prime Gaming, z računi, v katere ste že prijavljeni. Odprta koda, za Chrome in Firefox.", "tagline": "Namesto vas prevzema brezplačne igre z Epic Games, Steama, GOG-a, IndieGale in Prime Gaming, po urniku, ki ga izberete.", "intro": "Trgovine vsak teden podarjajo igre, a le tistim, ki jih pravočasno prevzamejo. Free Game Claimer preverja trgovine, ki jih izberete, in vsako ponudbo prevzame z računi, v katere ste v brskalniku že prijavljeni. Vaših gesel nikoli ne zahteva.", "promo_alt": "Okno razširitve Free Game Claimer s seznamom tedenskih brezplačnih iger z Epic Games in Prime Gaming", + "whats_new_nav": "Novosti", + "whats_new_title": "Novosti v različici 4.0", + "new1": "100-odstotni popusti na Epicu: poleg Epicovih tedenskih brezplačnih iger zdaj prevzema tudi igre, ki jih založniki za omejen čas znižajo za 100 %. Funkcija je privzeto vklopljena (Limited-time 100%-off sales pod Epic Games); Firefox enkrat prosi za dostop do store.epicgames.com.", + "new2": "Brezplačne mobilne igre z Epica: pod Epic Games vklopite Free Android games (po vsem svetu) ali Free iPhone and iPad games (samo v EU) in prevzemala bo tudi Epicove tedenske brezplačne mobilne igre. Dodajo se v vašo knjižnico Epic, od koder jih namestite z aplikacijo Epic Games Store na telefonu. Obe stikali sta privzeto izklopljeni; ko katero vklopite, vas brskalnik enkrat prosi za dostop.", + "new3": "Pomoč pri captchi: ko Epic zahteva captcho, se zavihek s prevzemom prikaže v ospredju z obvestilom, da se prevzem po rešitvi zaključi sam. Opozorilo v oknu razširitve ima gumb Try again.", "step1": "Razširitev dodajte v Chrome ali Firefox (različica 113 ali novejša) z gumboma na vrhu strani.", "step2": "V istem brskalniku ostanite prijavljeni v trgovine, iz katerih želite igre. Takoj po namestitvi preveri Epic Games in Steam ter prevzame vse brezplačno, v zavihkih v ozadju, ki se zaprejo sami.", - "step3": "V oknu razširitve izberite trgovine in kdaj naj preverja. Ko vklopite GOG, IndieGalo ali Prime Gaming, vas brskalnik prosi za dostop do teh strani.", + "step3": "V oknu razširitve izberite trgovine in kdaj naj preverja. Ko vklopite GOG, IndieGalo, Prime Gaming ali Epicove brezplačne mobilne igre, vas brskalnik prosi za dostop do teh strani.", "step4": "Razširitev lahko pripnete v orodno vrstico. Njena značka pokaže, kdaj prevzema in kdaj trgovina potrebuje vas.", "settings_caption": "Nastavitve: začasna ustavitev, čas preverjanja, najnižja ocena na Steamu in prijava v posamezne trgovine.", "feature1": "Pet trgovin: Epic Games in Steam sta privzeto vklopljena. GOG, IndieGala in Prime Gaming so le klik stran.", - "feature2": "Vaš urnik: preverjanje ob zagonu brskalnika, vsako uro, vsakih 6 ali 12 ur ali enkrat na dan ob izbrani uri (privzeto enkrat na dan). Stikalo Auto-claim ga začasno ustavi, Claim now pa preveri takoj.", - "feature3": "Zavihek Free Games: vse igre, ki so v vaših trgovinah trenutno brezplačne, kdaj se ponudba izteče, igra Epica za naslednji teden in oznaka In library pri igrah, ki jih na Steamu ali Epicu že imate.", - "feature4": "Filter ocen na Steamu: preskoči brezplačne igre na Steamu z oceno pod izbrano mejo, od 20 % do 90 % pozitivnih mnenj.", - "feature5": "Prime Gaming: izberite, katere ponudbe naj prevzame: Amazon Games ali igre in kode za Epic, GOG, Microsoft Store in Legacy Games. Kode za GOG, Microsoft Store in Legacy Games unovči namesto vas. Potrebna je naročnina Amazon Prime.", - "feature6": "IndieGala: prevzema brezplačne igre in vsak dan zavrti kolo sreče. Ključ za Steam, ki ga dobi, aktivira v vašem računu Steam.", - "feature7": "Nobena koda se ne izgubi: koda ali ključ za Steam, ki ga ni mogoče unovčiti samodejno, na primer zaradi regijske omejitve, počaka na seznamu Needs manual redeem z gumbom za kopiranje.", - "feature8": "Stanje trgovin: okno pokaže, ali ste prijavljeni v posamezno trgovino, in vas opozori, ko trgovina zahteva captcho ali se je spremenila tako, da je razširitev še ne zna obdelati.", + "feature2": "Več brezplačnih iger z Epica: poleg tedenskih brezplačnih iger prevzema igre, ki jih založniki za omejen čas znižajo za 100 % (privzeto vklopljeno), in, če to vklopite, Epicove tedenske brezplačne mobilne igre za Android ter za iPhone in iPad (samo v EU).", + "feature3": "Vaš urnik: preverjanje ob zagonu brskalnika, vsako uro, vsakih 6 ali 12 ur ali enkrat na dan ob izbrani uri (privzeto enkrat na dan). Stikalo Auto-claim ga začasno ustavi, Claim now pa preveri takoj.", + "feature4": "Zavihek Free Games: vse igre, ki so v vaših trgovinah trenutno brezplačne, kdaj se ponudba izteče, igra Epica za naslednji teden in oznaka In library pri igrah, ki jih na Steamu ali Epicu že imate.", + "feature5": "Filter ocen na Steamu: preskoči brezplačne igre na Steamu z oceno pod izbrano mejo, od 20 % do 90 % pozitivnih mnenj.", + "feature6": "Prime Gaming: izberite, katere ponudbe naj prevzame: Amazon Games ali igre in kode za Epic, GOG, Microsoft Store in Legacy Games. Kode za GOG, Microsoft Store in Legacy Games unovči namesto vas. Potrebna je naročnina Amazon Prime.", + "feature7": "IndieGala: prevzema brezplačne igre in vsak dan zavrti kolo sreče. Ključ za Steam, ki ga dobi, aktivira v vašem računu Steam.", + "feature8": "Nobena koda se ne izgubi: koda ali ključ za Steam, ki ga ni mogoče unovčiti samodejno, na primer zaradi regijske omejitve, počaka na seznamu Needs manual redeem z gumbom za kopiranje.", + "feature9": "Stanje trgovin: okno pokaže, ali ste prijavljeni v posamezno trgovino, in razloži, kaj je šlo narobe, ko trgovina zahteva captcho ali se je spremenila tako, da je razširitev še ne zna obdelati. Report a problem odpre zahtevek na GitHubu, v katerem so različica razširitve, brskalnik in stanje trgovin že izpolnjeni (brez podatkov o računih).", "library_caption": "Zavihek Free Games: kdaj se ponudba izteče, igre, ki jih že imate, in brezplačna igra naslednjega tedna.", "privacy1": "Uporablja račune trgovin, v katere ste prijavljeni v tem brskalniku. Vaših gesel nikoli ne zahteva in jih ne shranjuje.", "privacy2": "Ni računa, strežnika, analitike ali sledenja. Nastavitve in seznami iger ostanejo v shrambi razširitve v vašem brskalniku, razširitev pa komunicira samo s trgovinami.", - "privacy3": "Ob namestitvi zahteva dostop do Steama in Epic Games. Dostop do GOG-a, IndieGale in strani za Prime Gaming (Amazon ter strani za unovčenje GOG, Microsoft in Legacy Games) zahteva šele, ko trgovino vklopite.", + "privacy3": "Ob namestitvi zahteva dostop do Steama in Epic Games. Dostop do GOG-a, IndieGale, strani za Prime Gaming (Amazon ter strani za unovčenje GOG, Microsoft in Legacy Games) in Epicove mobilne trgovine zahteva šele, ko trgovino ali možnost vklopite. Firefox enkrat prosi še za dostop do store.epicgames.com, za 100-odstotno znižane igre na Epicu.", "privacy4": "Je brezplačna, brez oglasov in plačljivih funkcij, z odprto kodo pod licenco GPL-3.0. Koda na GitHubu.", "q1": "Zakaj igre ni prevzela?", "a1": "Odprite okno razširitve in preverite stanje trgovine. Običajni razlogi: niste prijavljeni v trgovino, Epic zahteva captcho (njegov zavihek se prikaže v ospredju, da jo rešite), trgovina je izklopljena ali pa je igro preskočil filter ocen na Steamu. Claim now poskusi znova takoj.", @@ -255,9 +261,11 @@ "a4": "Tako pogosto, kot izberete: ob zagonu brskalnika, vsako uro, vsakih 6 ali 12 ur ali enkrat na dan, kar je privzeto. Pri dnevnem preverjanju lahko izberete uro; če je brskalnik takrat zaprt, preveri, ko ga isti dan znova odprete.", "q5": "Ali prevzame Epicove praznične skrivnostne igre?", "a5": "Po vašem urniku prevzame vsako igro, ki jo Epicov seznam brezplačnih iger prikazuje kot brezplačno. Skrivnostnih iger ne obravnava posebej, zato če katero zgreši, pritisnite Claim now ali jo prevzemite na Epicovi strani.", - "q6": "Je res brezplačna?", - "a6": "Da. Nima oglasov, plačljive različice ali premium funkcij, koda pa je odprta. Če vam prihrani denar, jo lahko podprete spodaj, vendar vam ni treba.", - "q7": "Ali obstaja različica za Microsoft Edge?", - "a7": "V trgovini Edge Add-ons je še ni, a Edge lahko namesti različico za Chrome: odprite povezavo do Chrome Web Store na vrhu strani in dovolite razširitve iz drugih trgovin, ko vas Edge vpraša." + "q6": "Ali prevzame Epicove brezplačne mobilne igre?", + "a6": "Da, od različice 4.0. V oknu razširitve pod Epic Games vklopite Free Android games ali Free iPhone and iPad games (samo v EU). Prevzame jih z računom Epic, v katerega ste prijavljeni v brskalniku, in dodajo se v vašo knjižnico Epic, od koder jih namestite z aplikacijo Epic Games Store na telefonu.", + "q7": "Je res brezplačna?", + "a7": "Da. Nima oglasov, plačljive različice ali premium funkcij, koda pa je odprta. Če vam prihrani denar, jo lahko podprete spodaj, vendar vam ni treba.", + "q8": "Ali obstaja različica za Microsoft Edge?", + "a8": "V trgovini Edge Add-ons je še ni, a Edge lahko namesti različico za Chrome: odprite povezavo do Chrome Web Store na vrhu strani in dovolite razširitve iz drugih trgovin, ko vas Edge vpraša." } } diff --git a/src/components/extensions/freeGameClaimer/FreeGameClaimer.tsx b/src/components/extensions/freeGameClaimer/FreeGameClaimer.tsx index 8a1e694..8ec7daf 100644 --- a/src/components/extensions/freeGameClaimer/FreeGameClaimer.tsx +++ b/src/components/extensions/freeGameClaimer/FreeGameClaimer.tsx @@ -4,6 +4,7 @@ import { faLightbulb, faListOl, faShieldHalved, + faWandMagicSparkles, } from "@fortawesome/free-solid-svg-icons"; import { useLanguage } from "../../../context/LanguageContext"; @@ -20,6 +21,11 @@ const GROUP = "CLAIMER"; function FreeGameClaimer() { const { text } = useLanguage(); const sections = [ + { + id: "whats-new", + icon: faWandMagicSparkles, + text: text.CLAIMER.whats_new_nav, + }, { id: "setup", icon: faListOl, text: text.EXTENSION.setup_title }, { id: "features", icon: faLightbulb, text: text.GENERAL.features }, { id: "privacy", icon: faShieldHalved, text: text.EXTENSION.privacy_title }, @@ -48,6 +54,12 @@ function FreeGameClaimer() { /> + {/* The extension's popup links here: keep the id "whats-new". */} +
+

{text.CLAIMER.whats_new_title}

+ +
+

{text.EXTENSION.setup_title}

{text.GENERAL.features}

- +

{text.EXTENSION.faq_title}

- +

{text.EXTENSION.faq_bug}{" "} { - // eslint-disable-next-line + // Read once per page: an in-page anchor click must keep its smooth scroll. + const hash = window.location.hash.slice(1); + const target = hash ? document.getElementById(hash) : null; + if (target) { + target.scrollIntoView({ behavior: "instant", block: "start" }); + return; + } window.scrollTo({ top: 0, left: 0, behavior: "instant" }); }, [pathname]);