Skip to content

Instantly share code, notes, and snippets.

@WiNiFiX
Forked from timyc/remove_curseforge_ads.md
Created September 24, 2024 09:26
Show Gist options
  • Save WiNiFiX/7641c83b785852204bdd1fa2317d47ae to your computer and use it in GitHub Desktop.
Save WiNiFiX/7641c83b785852204bdd1fa2317d47ae to your computer and use it in GitHub Desktop.
Remove CurseForge ads from the launcher

This only applies for Windows on the default CurseForge installation. You should have a modern Node.JS installation (I'm using version 20)

  1. Go to C:\Users\<YOUR USER>\AppData\Local\Programs\CurseForge Windows\resources
  2. Run npx @electron/asar extract app.asar app_made_by_tards on your cmd
  3. Go to the new app_made_by_tards folder and locate the dist folder
  4. Go to the dist folder and locate the desktop folder
  5. Go to the desktop folder and open desktop.js

As of right now, what needs to be edited is on LINE 165

  1. Try searching for something like "aside",{className:(()=>{let e={"curseforge-ad" and change "curseforge-ad":!0,subscribed:!1 to "curseforge-ad":0,subscribed:1

You are only removing the ! marks to emulate being a "subscribed" user

  1. Search for className:"ad-inner",children:(0,s7.jsx)(b9,{show:!t&&f() and replace !t&&f() with 0
  2. Search for children:[(0,s7.jsxs)("span",{children:[m(b7.adsIntro),"."] and replace [m(b7.adsIntro),"."] with [] to skip the intro video

Now we're ready to re-pack the app.

  1. Run npx @electron/asar pack app_made_by_tards app.asar in the same directory that the initial unpacked folder is in (C:\Users\<YOUR USER>\AppData\Local\Programs\CurseForge Windows\resources)
  2. Delete the initial CurseForge data folder located at C:\Users\<YOUR USER>\AppData\Roaming. Should be the folder named CurseForge.

Relaunch the app and you will no longer see ads.

As of right now, this works but updates to the launcher may change the compiled electron output; I would recommend preventing the app from updating. I believe deleting app-update.yml should do the trick?

If any of the string I used for searching above does not work, search for support.overwolf.com in the file and the line before the opening <style> tag should be the line to edit.

IF for some reason there are still ads showing somewhere, add these domains to an ad blocking client like AdGuard

||adnexus.net^
||sja.yahoo.com^
||criteo.com^
@Texbio
Copy link

Texbio commented Nov 7, 2024

No longer works :(

@cemerson
Copy link

O7 for having it working at some point (and omg the ads in this app are insanely bad/cringe)

@RetakeEden
Copy link

This is still working for me. The strings and the referenced functions for ad displays have different names, but spoofing sub functionality is still possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment