├── LICENSE.md ├── README.md └── script.js /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Roman Davydov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # highlight-friends 2 | ![](https://img.shields.io/github/license/rdavydov/highlight-friends?style=for-the-badge&logo=github&color=purple&logoColor=thistle) 3 | ![](https://img.shields.io/greasyfork/dt/450409?style=for-the-badge&logo=tampermonkey&color=darkblue&logoColor=aquamarine) 4 | 5 | ***Steam Website** - Highlight specific friends who play* 6 | 7 | https://greasyfork.org/en/scripts/450409-highlight-specific-friends-who-play?locale_override=1 8 | 9 | Highlights specific friends on the "who play" page and on the store page 10 | 11 | **You must manually edit the code and add links to your friends' profiles to the "friends" array. Read the comments in the code.** 12 | -------------------------------------------------------------------------------- /script.js: -------------------------------------------------------------------------------- 1 | sk a question, post a review, or report the script. 2 | // ==UserScript== 3 | // @name Highlight specific friends who play 4 | // @match https://steamcommunity.com/id/*/friendsthatplay/* 5 | // @match https://store.steampowered.com/app/* 6 | // @icon https://www.google.com/s2/favicons?sz=64&domain=steampowered.com 7 | // @author rdavydov 8 | // @description Highlights specific friends on the "who play" page and on the store page 9 | // @license MIT 10 | // @version 0.0.1.20220829135439 11 | // @namespace https://greasyfork.org/users/952134 12 | // ==/UserScript== 13 | 14 | // var instead of let because violentmonkey throws warnings :) 15 | 16 | //////////////////////////////////////////////////////////////////////////////////////// 17 | // Add links to your friends' profiles (without a slash at the end), separated by commas 18 | // Each link should be surrounded with apostrophes ('), see the example below ////////// 19 | //////////////////////////////////////////////////////////////////////////////////////// 20 | var friends = ['https://steamcommunity.com/id/gabelogannewell','https://steamcommunity.com/id/gaben']; 21 | //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 22 | //////////////////////////////////////////////////////////////////////////////////////// 23 | 24 | document.querySelectorAll('.friendBlockLinkOverlay').forEach(function(element, index) { 25 | if (friends.indexOf(element.href) >= 0) { 26 | document.querySelectorAll('.friendBlockLinkOverlay')[index].style.background = 'rgba(0, 255, 0, 0.20)'; 27 | } 28 | }); 29 | 30 | document.querySelectorAll('.friend_blocks_grid a').forEach(function(element, index) { 31 | if (friends.indexOf(element.href.slice(0,-1)) >= 0) { 32 | document.querySelectorAll('.friend_blocks_grid a')[index].style.background = 'green'; 33 | } 34 | }); 35 | --------------------------------------------------------------------------------