Last active
September 27, 2025 16:27
-
-
Save Luckz/b392af08d52bdf25d6ade70c58ef739f to your computer and use it in GitHub Desktop.
SteamStoreCheevoComfort.user.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Steam Store Cheevo Comfort | |
| // @namespace luckz | |
| // @author luckz | |
| // @version 0.7.4 | |
| // @description put them in a better place | |
| // @match https://store.steampowered.com/app/* | |
| // @match https://store.steampowered.com/sub/* | |
| // @grant GM_addStyle | |
| // @downloadURL https://gist.github.com/Luckz/b392af08d52bdf25d6ade70c58ef739f/raw/SteamStoreCheevoComfort.user.js | |
| // @updateURL https://gist.github.com/Luckz/b392af08d52bdf25d6ade70c58ef739f/raw/SteamStoreCheevoComfort.user.js | |
| // ==/UserScript== | |
| /*global $J */ | |
| 'use strict'; | |
| // == Configuration == == Configuration == == Configuration == == Configuration == | |
| const mode = "basic"; // basic | advanced => SteamHunters | |
| const addplusmore = true; // false | true => for games with 1β4 cheevos, add "View all" button | |
| const fixsearch = true; // false | true => add store search for dev/pub back in when missing; Augmented Steam users should turn this off | |
| const searchemoji = "silly"; // nope | yes | silly => 'SEARCH' or emoji | |
| const familyvisible = true; // false | true => make "A member of your Steam Family already owns this game" stand out more | |
| const claimfix = true; // false | true => green Download button tries to launch stuff. that's bad. fix it. | |
| const claimfixbyreplacing = true; // false | true => fix it by replacing vs by adding a new one. | |
| // ==/Configuration == ==/Configuration == ==/Configuration == ==/Configuration == | |
| const sleep = ms => new Promise(f => setTimeout(f, ms)); | |
| let node; | |
| let app = window.location.href.split('/')[4]; | |
| if ($J('#achievement_block > .communitylink_achievement_images').length > 0) { // Valve doesn't feel like fixing this :F | |
| // if broken try "position: relative; display: inline-grid; right: -255px; top: -17px; max-height: 36px; z-index: 2;") | |
| // and: node.insertAfter('.queue_ctn > .queue_actions_ctn > #ignoreBtn'); | |
| node = $J('#achievement_block').clone().attr("style","position: relative; float: right; right: 35px; top: -17px; max-height: 36px; z-index: 2; width: 364px").removeAttr('id'); // 2025-09 CSS is huge without setting width: 364px is like Valve sidebar; 396px bit bigger | |
| $J('.communitylink_achievement_images', node).attr("style","justify-content: flex-start;"); // 2025-09 CSS spaces achievement icons and buttons out with "space-between", which looks like ass | |
| if ($J('.in_queue').length) | |
| node.css('top', '-22.5px'); | |
| if (addplusmore && $J('.communitylink_achivement_plusmore', node).length == 0) | |
| $J('div.communitylink_achievement', node).last().after(`<a class="communitylink_achievement communitylink_achivement_plusmore" href="https://steamcommunity.com/stats/${app}/achievements">View<br>all</a>`) | |
| /* if (mode === 'fancy') { | |
| node.css('right', '70px'); //let node = $J('#achievement_block').clone().attr("style","position: relative; float: right; right: 70px; top: -17px; max-height: 36px;"); | |
| ; | |
| ; | |
| } | |
| else*/ | |
| if (mode === 'advanced') { | |
| node.css('right', '20px'); // 15 px offset | |
| // $J('div.communitylink_achievement', node).last() by itself would also work, but ternary = fun. | |
| ($J('.communitylink_achivement_plusmore', node).length > 0 ? $J('.communitylink_achivement_plusmore', node) : $J('div.communitylink_achievement', node).last()).after(`<a class="communitylink_achievement communitylink_achivement_plusmore" href="https://steamhunters.com/apps/${app}/achievements" style="margin-left: 6px;">Steam Hunters</a>`); | |
| } | |
| else //if (mode === 'basic') | |
| ; | |
| await sleep(500); // Steam Achievement Guide compatibility | |
| node.insertAfter('.queue_ctn > .queue_actions_ctn > .btnv6_blue_hoverfade, .queue_ctn > .queue_actions_ctn > .next_in_queue_area'); | |
| } | |
| if (fixsearch) { | |
| const [dev, pub, cur] = ['developer', 'publisher', 'curator']; | |
| let template; | |
| switch (searchemoji) { | |
| case 'nope': | |
| template = (type, name) => ` [ <a href="https://store.steampowered.com/search/?${type}=${name}">SEARCH</a> ]`; | |
| break; | |
| case 'yes': | |
| template = (type, name) => ` [ <a href="https://store.steampowered.com/search/?${type}=${name}">π</a> ]`; | |
| break; | |
| case 'sillyClassic': | |
| template = (type, name) => ` [ <a href="https://store.steampowered.com/search/?${type}=${name}">${type == dev ? 'π’' : 'π'}</a> ]`; | |
| break; | |
| case 'silly': | |
| default: | |
| template = (type, name) => ` <a href="https://store.steampowered.com/search/?${type}=${name}">${type == dev ? 'π’' : 'π'}</a>`; | |
| break; | |
| } | |
| const templateBothClassic = (name) => ` [ <a href="https://store.steampowered.com/search/?developer=${name}">π’</a> <a href="https://store.steampowered.com/search/?publisher=${name}">π</a> ]`; | |
| const templateBoth = (name) => ` <a href="https://store.steampowered.com/search/?developer=${name}">π’</a> <a href="https://store.steampowered.com/search/?publisher=${name}">π</a>`; | |
| await sleep(250); // SteamDB compatibility | |
| $J('div.dev_row > div.summary > a, .details_block span a').each((i,elem) => { | |
| const str = $J(elem).attr('href').split('/')[3]; | |
| if ($J(elem).text() == 'Homepage') return; // Augmented Steam compatibility | |
| if ($J(elem).hasClass('steamdb_dev_pub_link')) return; // SteamDB compatibility | |
| if (str == dev) { | |
| $J(elem).after(template(dev, $J(elem).text())); | |
| } else if (str == pub) { | |
| $J(elem).after(template(pub, $J(elem).text())); | |
| } else if (str == cur) { | |
| if (searchemoji == 'silly') $J(elem).after(templateBoth($J(elem).text())); | |
| else $J(elem).after(templateBothClassic($J(elem).text())); | |
| } | |
| }); | |
| } | |
| if (familyvisible) { // #7f72e4; is the purple used by SteamDB, while the text color is illegible if not made fully white | |
| GM_addStyle(` | |
| .game_purchase_area_owned_by_family { | |
| background-color: #7f72e4; | |
| color: #ffffff; | |
| }`); | |
| } | |
| if (claimfix && $J('#freeGameBtn').length) { | |
| const btn = $J('#freeGameBtn > .btn_green_steamui :first'); | |
| const greenButton = claimfixbyreplacing ? btn : btn.clone(); | |
| greenButton.children('span').text('Install / Claim'); | |
| greenButton.attr('href', (_, href) => href.replace('steam://run/', 'steam://install/')); | |
| if (!claimfixbyreplacing) btn.after(greenButton); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What exactly does this script do?