Advertisement
tiqh

Untitled

Aug 17th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. // ==UserScript==
  2. // @name VacyourfriendsRemastered
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Prank friends by adding a fake VAC status to their profile. Based on the site https://vacyourfriends.com/ which no longer seems to be operational.
  6. // @author TechnicalOpposite
  7. // @match *://steamcommunity.com/profiles/*
  8. // @match *://steamcommunity.com/id/*
  9. // @grant GM_addStyle
  10. // ==/UserScript==
  11.  
  12. (function () {
  13. 'use strict';
  14.  
  15. // Append the button to apply fake VAC status
  16. document.getElementById('global_action_menu').insertAdjacentHTML('beforeend', '<div id="vyf_btn" class="vyf_btn_red"><a class="vyf_btn_content">VAC Them</a>');
  17.  
  18. const vacbanhtml = '<div class="profile_ban_status"><div class="profile_ban">1 VAC ban on record<span class="profile_ban_info"> | <a class="whiteLink" href="https://support.steampowered.com/kb_article.php?ref=7849-Radz-6869&l=english" target="_blank" rel="noreferrer">Info</a></span></div>0 day(s) since last ban</div>';
  19.  
  20. // Inject VAC ban HTML into the DOM, aka "VAC" your friends.
  21. document.getElementById('vyf_btn').onclick = function () {
  22. if (!document.getElementsByClassName('profile_ban_status').length) {
  23. if (document.getElementsByClassName('profile_private_info').length) {
  24. document.getElementsByClassName('profile_rightcol')[0].insertAdjacentHTML('beforeend', vacbanhtml);
  25. } else {
  26. document.getElementsByClassName('responsive_status_info')[0].insertAdjacentHTML('beforeend', vacbanhtml);
  27. }
  28. }
  29. }
  30. // CSS
  31. GM_addStyle(`#vyf_btn{
  32. display:inline-block;
  33. position:relative;
  34. line-height:24px;
  35. margin-left:3px
  36. }
  37. .vyf_btn_red{
  38. background-color:#b31515
  39. }
  40. .vyf_btn_content{
  41. display:inline-block!important;
  42. padding-left:35px!important;
  43. padding-right:9px!important;
  44. background-position:10px 5px!important;
  45. background-image:url(https://i.postimg.cc/tJ3L2Fbb/vac-them-button.png);
  46. background-repeat:no-repeat;
  47. text-decoration:none;
  48. color:#e5e4dc!important;
  49. font-weight:400
  50. }`)
  51. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement