Skip to content

Instantly share code, notes, and snippets.

@NZDev0
Created January 10, 2023 08:31
Show Gist options
  • Save NZDev0/eeaaa49e483780faa60a5fcee88ccc2f to your computer and use it in GitHub Desktop.
Save NZDev0/eeaaa49e483780faa60a5fcee88ccc2f to your computer and use it in GitHub Desktop.
GoG.com - Hide known Demos & Prologue Button
/* ==UserScript==
// @name GoG.com - Hide known Demos & Prologue Button
// @namespace https://gist.github.com/NZDev0/
// @author Dev0 NZ
// @description Adds a button to hide known Demos & Prologue
// @match https://www.gog.com/en/games*
// @run-at document-end
// @version 1.0.0
==/UserScript== */
var got = [
"8-Bit Adventures 2: Demo", "A Musical Story Demo", "A Space for the Unbound - Prologue", "A Tale of Paper Demo", "A.I.D. - Artificial Intelligence Defence Demo", "Absolute Tactics: Daughters of Mercy Demo", "Against the Moon: Prologue", "Against the Storm Demo", "Aground Demo", "Airhead Demo", "Alder Choke DEMO", "Alder's Blood Prologue", "AMID EVIL Demo", "B.I.O.T.A. Demo", "Backbone Prologue", "Bad North: Jotunn Edition - Demo", "BEAUTIFUL DESOLATION Demo", "Beholder 3 Demo", "Berserk Boy Demo", "Black Book Demo", "Black Skylands Demo", "Blade of Darkness Demo", "Bleeding Moons Demo", "Boxville Demo", "BROK The InvestiGator - prologue", "Builders of Egypt: Prologue", "Butcher Demo", "Card Shark Demo", "Carto Demo", "Catie in MeowmeowLand Demo", "Chasm: The Rift Demo", "Coffee Noir - Business Detective Game DEMO", "Coffee Talk Demo", "Coffee Talk Episode 2: Hibiscus & Butterfly Demo", "Cold Hearts Demo", "CONSCRIPT DEMO", "Crossing Souls Demo", "Crowns and Pawns: Kingdom of Deceit Demo", "Crying Suns Demo", "Curved Space Demo", "Death and Taxes Demo", "Death Trash Demo", "Defend the Rook Demo", "Desperados III Demo", "Destroy All Humans! Demo", "Dex Demo", "Diluvian Winds: Prologue", "Din's Legacy Demo", "Disaster Report 4: Summer Memories Demo", "Disjunction Demo", "Driftland: The Magic Revival Demo", "Dry Drowning Demo", "Egypt: Old Kingdom Demo", "Exophobia Demo", "Fabled Lands Demo", "Fantasy General II: Prologue", "Faraday Protocol Demo", "Farlanders Prologue", "Figment 2: Creed Valley Demo", "First Feudal Demo", "Flashout 3 Demo", "Flooded DEMO", "Forgotten Fields Demo", "Gamedec - Definitive Edition - Free Characters Bundle", "Gamedec Demo", "Ghostrunner Demo", "GLITCHED DEMO", "Gloomwood Demo", "Guild of Darksteel Demo", "Happy Game Demo", "Hedon Demo", "Hell Architect: Prologue", "Hell Pie Demo", "Hellslave Demo", "Herald: An Interactive Period Drama - Book I & II Demo", "Highrise City Demo", "HROT Demo", "Imagine Earth Demo", "Imperial Grace Demo", "Inscryption Demo", "It's a Wrap Demo", "KAPIA Demo", "Kathy Rain demo", "Knights of the Chalice Demo", "Kurokami-sama's Feast Demo", "Lacuna: Prologue", "Legend of Keepers: Prologue", "LEGO® Bricktales DEMO", "Liberated Free Trial", "Little Nightmares II - DEMO", "Looking for Aliens Demo", "Loretta Demo", "Loria Demo", "Lunistice Demo", "Lust from Beyond: M Edition - Demo", "Mainlining Demo", "MarZ: Tactical Base Defense Demo", "Mask of the Rose Demo", "McPixel 3 Demo", "Mira and the Legend of the Djinns Demo", "Mondealy Demo", "Moviehouse Demo", "Mutant Year Zero: Road to Eden Demo", "Nadir: A Grimdark Deck Builder Demo", "NecroBouncer: Prologue", "Neurodeck: Psychological Deckbuilder Demo", "Nightmare Reaper Demo", "Nine Noir Lives Demo", "Nongunz: Doppelganger Edition Demo", "Oaken DEMO", "Oddventure Demo", "Okinawa Rush Demo", "One Dreamer: Prologue", "orbit.industries demo", "Ozymandias: Bronze Age Empire Sim DEMO", "Patron Demo", "Peglin Demo", "Pile Up! Demo", "Potion Tycoon Demo", "Predynastic Egypt Demo", "Racine Demo", "Ravenous Devils Demo", "Recursive Ruin Demo", "Relicta Demo", "Reverie Knights Tactics: Prologue", "Ring of Pain Demo", "Roadwarden Demo", "Sacred Fire Demo", "Sclash Demo", "Scrapnaut: Prologue", "Seven: The Days Long Gone Demo", "Shadow Tactics: Blades of the Shogun Demo", "Shardpunk: Verminfall Demo", "Siege Survival: Gloria Victis Prologue", "Signs of the Sojourner: Prologue", "Silence Demo", "SKALD: Against the Black Priory - Demo", "Slender Threads: Prologue", "Smelter Demo", "Snowtopia Demo", "Song of Farca: Prologue", "Soulash Demo", "Souno's Curse Demo", "Space Tail: Every Journey Leads Home Demo", "Spindle Demo", "Spiritfarer Demo", "Star Vikings Demo", "STASIS: BONE TOTEM DEMO", "Steel Rats™ Demo", "Stories Untold Demo", "Strategic Mind: Fight for Freedom Demo", "Syberia: The World Before Demo", "System Shock Demo", "Tavern Master Demo", "Terra Nil Demo", "The Chronicles Of Myrtana: Archolos", "The Legend of Heroes: Trails of Cold Steel III Demo", "The Long Reach - DEMO", "The Longest Road on Earth Demo", "The Magister Demo", "The Occupation Demo", "The Pedestrian Demo", "The Plane Effect Prologue", "The Riftbreaker: Prologue", "The Signifier Director’s Cut Demo", "The Silver Case Demo", "The Tale of Bistun Demo", "The Textorcist: The Story of Ray Bibbia Demo", "Trash Sailors Demo", "Trifox Demo", "Turbo Overkill Demo", "ULTRAKILL DEMO", "Unbound: Worlds Apart Prologue", "UNDETECTED Demo", "UnMetal Demo", "Vagrus - The Riven Realms: Prologue", "Vanaris Tactics Demo", "VED Demo", "Virgo Versus the Zodiac Demo", "VirtuaVerse Demo", "Warriors of the Nile 2 Demo", "Werewolf: The Apocalypse - Heart of the Forest Demo", "Whateverland: Prologue", "Willy Morgan and the Curse of Bone Town Demo", "Wolfstride Demo", "Ys IX: Monstrum Nox (Demo)", "Zid Journey DEMO", "Zombasite Demo", "Zombie Rollerz: Pinball Heroes Demo", "Zoria: Age of Shattering DEMO", "Zoria: Age of Shattering Prologue", "ΔV: Rings of Saturn Demo"
];
var hide_btn = document.createElement("button");
hide_btn.style.marginTop = "2px";
hide_btn.style.marginRight = "5px";
hide_btn.innerHTML = "Hide Demos/Prologue";
hide_btn.addEventListener("click", function () {
var doc = document.querySelectorAll('.product-tile--grid');
for (var i = 0; i < doc.length; i++) {
var game_title = doc[i].childNodes[1].childNodes[0].title;
if(got.includes(game_title)){
doc[i].parentNode.style.display = "none";
}
}
});
setTimeout(()=>{
document.querySelector('.catalog__sort-component').parentNode.insertBefore(hide_btn, document.querySelector('.catalog__sort-component'));
},2500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment