Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name gg.deals link in Steam page
- // @namespace http://github.com/helioobianchi
- // @version 0.2
- // @description turns "Community Hub" into a link to gg.deals page
- // @author helioobianchi
- // @match https://store.steampowered.com/app/*
- // @match https://store.steampowered.com/sub/*
- // @match https://store.steampowered.com/bundle/*
- // @match https://store.steampowered.com/friendsthatplay/*
- // @match https://store.steampowered.com/gamecards/*
- // @match https://store.steampowered.com/recommended/*
- // @match https://store.steampowered.com/widget/*
- // @icon https://www.google.com/s2/favicons?sz=64&domain=gg.deals
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- let hubLink = document.querySelector('.apphub_OtherSiteInfo a:last-child');
- hubLink.href = location.href.replace(/store\.steampowered.com/g, 'gg\.deals/steam');
- hubLink.querySelector('span').setAttribute('data-tooltip-text', 'View on gg.deals');
- hubLink.querySelector('span').innerHTML = '<img alt="GG.logo" src="https://gg.deals/favicon-32x32.png" style="height: 100%;">';
- console.log('gg.deals replacement ran');
- })();
Add Comment
Please, Sign In to add comment