You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
// ==UserScript==// @name Steam Community Suite// @namespace http://jes.re/// @version 2.3.3// @description Making the Steam Community better and safer for everyone!// @updateURL http://jes.re/suite.meta.js// @downloadURL http://jes.re/suite.user.js// @match http://*/*// @match https://*/*// @grant GM_addStyle// @grant GM_getResourceText// @copyright 2014 Jessecar// @run-at document-end// ==/UserScript==// @resource steamCSS http://jes.re/steam.css/* SteamID Converter by xPaw - http://xpaw.ru - https://github.com/xPaw/SteamID */(function(){"use strict";vara=function(a){returna!==void0 ? null!==this.IsCommunityID(a)?this.SetCommunityID(a):null!==this.IsSteam2(a)?this.SetSteam2(a):this.SetAccountID(a):this};a.prototype={AccountID:0,IsCommunityID:function(a){return"string"!=typeofa?null:a.match(/^7656119([0-9]{10})$/)},IsSteam2:function(a){return"string"!=typeofa?null:a.match(/^STEAM_0:([0-1]):([0-9]+)$/)},SetAccountID:function(a){if("number"==typeofa)this.AccountID=a;else{if("string"!=typeofa||isNaN(a))return!1;this.AccountID=parseInt(a,10)}returnthis},SetCommunityID:function(a){if(a=this.IsCommunityID(a),null===a)return!1;a=a[0].substring(7);varb=a%2;returna=(a-b-7960265728)/2,this.AccountID=a<<1|b,this},SetSteam2:function(a){returna=this.IsSteam2(a),null===a?!1:(this.AccountID=a[2]<<1|a[1],this)},GetCommunityID:function(){return"7656119"+(7960265728+this.AccountID)},GetSteam2:function(){return"STEAM_0:"+(1&this.AccountID)+":"+(this.AccountID>>1)},GetSteam3:function(){return"[U:1:"+this.AccountID+"]"},GetAccountID:function(){returnthis.AccountID}},"object"==typeofmodule&&module&&"object"==typeofmodule.exports?module.exports=a:window.SteamID=a})();varSteamCommunitySuite={SafeDomains: ["scrap.tf","steamrep.com","sourceop.com","bazaar.tf","scrapbank.me","backpack.tf","wiki.tf","teamfortress.com","tf2b.com","tf2items.com","teamfortress.tv","reddit.com","valvesoftware.com","ppm.tf","tf2wh.com","tf2tp.com","trade.tf","tf2tp.com","jessecar96.net","xpaw.ru","reddit.com","tf2-trader.com","tf2r.com","tf2shop.com","csgolounge.com","dota2lounge.com","marktplace.tf","manncotrading.com","imgur.com","jes.re","steamgaug.es","steamstat.us","steamdb.info","marketplace.tf","tipofthehats.org","twitch.tv","rep.tf","dispenser.tf"],BadDomains: ["steam-cards.com","steamwalletcodes.com","free-steam-rebel.com","steam-hacks.com","getsteamcodes.com","steam-wallet.com","steampowers.net","steam-wallet.steam-key-giveaway.com","giftcodesgen.com","dota2-cheats.net","freesteamwalletcodes.com","steam-wallet-cards.com","steamwalletgiftcards.com","steamwalletcodes.online-cheats.com","free-steam-cards.com","newsteamcodes.com","share4steam.com","freesteamwalletcodes.info","freesteamwalletcodes.org","free-steam-wallet-codes.com","steamcodegenerator.com","free-steamwalletcodes.com","steamwallethack.net"],RememberedDomains: [],Messages:{good: "border-color:green;background:rgba(0,255,0,.3);",warn: "border-color:rgb(201, 129, 0);background:rgba(201, 129, 0, 0.3);",bad: "border-color:red;background:rgba(255,0,0,.3);"},ValveSiteTest: false,RValidSteamSite: /(?:http|https):\/\/(?:store.|support.|forums.|api.|media.|www.|)(?:steamcommunity|steampowered|dota2|steamgames|valvesoftware)\.com/,RPhishingSite: /(https?:\/\/|\/\/|www?.\.)\S*?[sz][tf][ea].?[mnru]..?.?[mnruv][mnruv]?..?.?[jiltf][jiltf][yi]\.\S+/i,Log: function(txt){console.log('%cSCS%c'+txt,'background: #222; color: #bada55;padding:2px;',"background:transparent;color:black;");},getElementByXpath: function(path){returndocument.evaluate(path,document,null,9,null).singleNodeValue;},ParseUrl: function(url){varparser=document.createElement('a');parser.href=url;returnparser;},OpenInNewTab: function(url){varwin=window.open(url,'_blank');win.focus();},OpenURLCopy: function(sid){unsafeWindow.ShowAlertDialog('Static Profile URL',"<b>Press Ctrl + C</b><br/><br/><div class='gray_bevel for_text_input'><input class='dynInput copythistext' type='text' size='70' value='https://web.archive.org/web/20141010155000/http://steamcommunity.com/profiles/"+sid+"/' ></div>");document.getElementsByClassName("copythistext")[0].focus();document.getElementsByClassName("copythistext")[0].select();},Load: function(){// Update & Add more safe domainsif(unsafeWindow.g_whiteListedDomains!=undefined){varSteamSafeDomains=unsafeWindow.g_whiteListedDomains;unsafeWindow.g_whiteListedDomains=SteamSafeDomains.concat(this.SafeDomains);this.SafeDomains.concat(SteamSafeDomains);}// Check Footer Elementsif(document.getElementById("footer_spacer")!=null&&this.getElementByXpath('//*[@id="footer"]/div')!=null&&document.getElementsByClassName("valve_links").length>0){this.ValveSiteTest=true;}// Check for links to stylesvarValveStyles=document.getElementsByTagName("link");for(vari=ValveStyles.length-1;i>=0;i--){if(ValveStyles[i].href.match(/http(s|):\/\/(?:cdn.|)steamcommunity.com\/public\/(shared)?/)){this.ValveSiteTest=true;}};// Check for links to JavaScriptvarValveScripts=document.getElementsByTagName("script");for(vari=ValveScripts.length-1;i>=0;i--){if(ValveScripts[i].src.match(/http(?:s|):\/\/(?:support.|cdn.|)(?:steamcommunity|steampowered).com(?:\/public\/(shared)|includes)?/)){this.ValveSiteTest=true;}};// Check for images (old phishing sites)varValveImages=document.getElementsByTagName("img");for(vari=ValveImages.length-1;i>=0;i--){if(ValveImages[i].src.match(/http(?:s|):\/\/(?:steamcommunity|steampowered).com\/public\/images\/trans/)){this.ValveSiteTest=true;}};// Load remembered domainsif(window.localStorage){if(window.localStorage['rememberedDomains']){SteamCommunitySuite.RememberedDomains=JSON.parse(window.localStorage['rememberedDomains']);}}varparsed="http://"+SteamCommunitySuite.ParseUrl(window.location.href).hostname,frag=parsed.replace(/[^.]*\.(?=\w+\.\w+$)/,'').replace("http://","");if(this.ValveSiteTest||SteamCommunitySuite.BadDomains.indexOf(frag)!=-1){if(window.location.href.match(this.RValidSteamSite)){// On Real Domainif(document.body.innerHTML.indexOf("Error 503 Service Unavailable")!=-1){document.body.innerHTML="<h1>503 Service unavailable. Reloading...</h1>";document.location.reload();}else{// External stylesvarjqUI_CssSrc=GM_getResourceText("steamCSS");GM_addStyle(jqUI_CssSrc);// Green top barif(document.getElementById("global_header")!=null)document.getElementById("global_header").style.borderBottom="2px solid green";// Functions that need to be delayed for some odd reasonsetTimeout(function(){// Remove ugly link hostsvarelements=document.getElementsByClassName("bb_link_host");for(vari=elements.length-1;i>=0;i--){elements[i].parentNode.removeChild(elements[i]);};// Ugly fix for comments not being initalizedvarscripts=document.getElementsByTagName("script");for(vari=scripts.length-1;i>=0;i--){if(scripts[i].innerHTML.indexOf("InitializeCommentThread(")!=-1){varscr=scripts[i].innerHTML;scr=scr.replace(/\r?\n|\r/g,"");scr=scr.substr(19);scr=scr.replace("})();","");scr=scr.replace(" };","");scr=scr.substr(0,scr.length-5);eval(scr);// Never do this :(}elseif(scripts[i].innerHTML.indexOf("new CEmoticonPopup(")!=-1){varscr=scripts[i].innerHTML;eval(scr);// Baaaaah}};// OnClick of links in SteamvarCommunityLinks=document.querySelectorAll("a.bb_link");for(vari=CommunityLinks.length-1;i>=0;i--){CommunityLinks[i].addEventListener("click",function(event){event.preventDefault();// This is so stupidvarbase_url=event.target.href;console.log(base_url);if(base_url==undefined){base_url=event.target.parentNode.href;if(base_url==undefined){base_url=event.target.parentNode.parentNode.href;if(base_url==undefined){base_url=event.target.parentNode.parentNode.parentNode.href;// Just give up after this...}}}varurl=base_url.replace("https://web.archive.org/web/20141010155000/https://steamcommunity.com/linkfilter/","").replace("?url=",""),parsed="http://"+SteamCommunitySuite.ParseUrl(url).hostname,frag=parsed.replace("http://","").replace("https://","").replace("www.","").replace(/[^.]*\.(?=\w+\.\w+$)/,''),steam_phish_msg="Unverified link. Take caution.",LinkColor=SteamCommunitySuite.Messages.warn,block_follow=false;if(frag=="steamcommunity.com"){window.location.href=url;}else{if(SteamCommunitySuite.SafeDomains.indexOf(frag)!=-1){LinkColor=SteamCommunitySuite.Messages.good;steam_phish_msg="Trusted community website.";}elseif(SteamCommunitySuite.RPhishingSite.test(url)){LinkColor=SteamCommunitySuite.Messages.bad;steam_phish_msg="Phishing Website! <b>Do not follow!</b>";}unsafeWindow.ShowConfirmDialog("Unverified Link","<div style='text-align:center;font-size:14px;'><div style='border-style:solid;border-width:3px;"+LinkColor+"color:#FFF;border-radius:6px;padding:8px;margin-bottom:5px;font-size:15px;text-align:center;'>"+url+"</div>"+steam_phish_msg+"<br/><br/><b>Make sure this is where you want to go before following it!</b></div>","Follow Link","Cancel").done(function(){SteamCommunitySuite.OpenInNewTab(url);});returnfalse;}});};},100);// Profilesif(unsafeWindow.g_rgProfileData!=undefined){varUserSID=newSteamID(unsafeWindow.g_rgProfileData['steamid']),SteamID64=UserSID.GetCommunityID();// Remove "show more" buttonif(document.getElementsByClassName("profile_summary").length>0)document.getElementsByClassName("profile_summary")[0].innerHTML=unsafeWindow.g_rgProfileData['summary'];// SteamIDs below namevarProfileSteamIDS=document.createElement("div");ProfileSteamIDS.innerHTML="<b>Community ID:</b> <a style='color:#898989;text-decoration:underline;' href='javascript:void(0);' onclick=\"SteamCommunitySuite.OpenURLCopy('"+UserSID.GetCommunityID()+"')\" >"+UserSID.GetCommunityID()+"</a><br/><b>Steam 2:</b> "+UserSID.GetSteam2()+"<br/><b>Steam 3:</b> "+UserSID.GetSteam3()+"<br/><br/>";document.body.appendChild(ProfileSteamIDS);varProfileName=document.getElementsByClassName("header_real_name")[0];if(ProfileName!=undefined){ProfileName.insertBefore(ProfileSteamIDS,ProfileName.firstChild);}else{varProfileHeaderSummary=document.getElementsByClassName("profile_header_summary")[0];varPrivateProfileInfo=document.getElementsByClassName("profile_private_info")[0];ProfileHeaderSummary.insertBefore(ProfileSteamIDS,PrivateProfileInfo);}// SteamRep & NotesvarSRBox="";SRBox+='<div class="community-links"><div class="profile_recentgame_header profile_leftcol_header links-header"><h2>Community Links</h2><div class="links-container"></div></div></div>';SRBox+='<div class="extra-notes-container"><div class="profile_recentgame_header profile_leftcol_header links-header notes-header"><h2>Extra Notes</h2><div class="extra-notes"><img src="https://web.archive.org/web/20141010155000/http://i.imgur.com/rSFZZgI.gif" alt="Loading"/> Loading Notes...</div></div></div>';SRBox+='<div class="sr-status"><div class="profile_recentgame_header profile_leftcol_header links-header rep-header"><h2><a target="_blank" href="https://web.archive.org/web/20141010155000/http://steamrep.com/profiles/'+SteamID64+'" >SteamRep Status</a></h2><div class="reputation-content"><img src="https://web.archive.org/web/20141010155000/http://i.imgur.com/rSFZZgI.gif" alt="Loading"/> Loading Rep...</div></div></div>';// Prepend boxes to profiledocument.getElementsByClassName("profile_leftcol")[0].innerHTML=SRBox+document.getElementsByClassName("profile_leftcol")[0].innerHTML;// Community LinksvarLinksContainer=document.getElementsByClassName("links-container")[0];LinksContainer.style.fontSize="14px";LinksContainer.innerHTML="";LinksContainer.innerHTML+="Backpack: <a target='_blank' href='https://web.archive.org/web/20141010155000/http://tf2b.com/tf2/"+SteamID64+"'>TF2B</a> | <a target='_blank' href='https://web.archive.org/web/20141010155000/http://backpack.tf/profiles/"+SteamID64+"'>backpack.tf</a> | <a target='_blank' href='https://web.archive.org/web/20141010155000/http://tf2items.com/profiles/"+SteamID64+"'>TF2Items</a> | <a target='_blank' href='https://web.archive.org/web/20141010155000/http://optf2.com/tf2/user/"+SteamID64+"'>OPTF2</a><br/>";LinksContainer.innerHTML+="Trading: <a target='_blank' href='https://web.archive.org/web/20141010155000/http://bazaar.tf/profiles/"+SteamID64+"'>bazaar.tf</a> | <a target='_blank' href='https://web.archive.org/web/20141010155000/http://www.tf2outpost.com/user/"+SteamID64+"'>TF2 Outpost</a> | <a target='_blank' href='https://web.archive.org/web/20141010155000/http://scrap.tf/profile/"+SteamID64+"'>Scrap.TF</a> | <a target='_blank' href='https://web.archive.org/web/20141010155000/http://dispenser.tf/id/"+SteamID64+"'>dispenser.tf</a><br/>";LinksContainer.innerHTML+="Misc: <a target='_blank' href='https://web.archive.org/web/20141010155000/http://rep.tf/"+SteamID64+"'>Rep.TF</a> | <a target='_blank' href='https://web.archive.org/web/20141010155000/http://tf2r.com/user/"+SteamID64+".html'>TF2R</a> | <a target='_blank' href='https://web.archive.org/web/20141010155000/http://dota2lounge.com/profile?id="+SteamID64+"'>Dota 2 Lounge</a> | <a target='_blank' href='https://web.archive.org/web/20141010155000/http://csgolounge.com/profile?id="+SteamID64+"'>CS:GO Lounge</a><br/>";// Extra Notesvaruser="";if(unsafeWindow.g_steamID!=false)user=unsafeWindow.g_steamID;varextrarequest=newXMLHttpRequest();extrarequest.open('GET',"https://web.archive.org/web/20141010155000/http://scrap.tf/profile.php?steamid="+SteamID64+"&user="+user,true);extrarequest.onload=function(){document.getElementsByClassName("extra-notes")[0].innerHTML=extrarequest.responseText;};extrarequest.send();// SteamRepvarsrequest=newXMLHttpRequest();srequest.open('GET',"https://web.archive.org/web/20141010155000/https://steamrep.com/api/beta3/reputation/"+SteamID64+"?json=1",true);srequest.onload=function(){varsteamrep=JSON.parse(srequest.responseText);steamrep=steamrep.steamrep;varfullrep=(steamrep.reputation.full=="") ? "No special reputation." : steamrep.reputation.full;document.getElementsByClassName("reputation-content")[0].innerHTML=fullrep;if(steamrep.reputation.full.indexOf("SCAMMER")!=-1){document.getElementsByClassName("rep-header")[0].style.backgroundColor="rgba(255, 0, 0, 0.25)";document.getElementsByClassName("rep-header")[0].style.border="2px solid red";document.getElementsByClassName("profile_header_bg_texture")[0].style.border="2px solid red";document.getElementsByClassName("profile_content")[0].style.border="2px solid red";document.getElementsByClassName("profile_content")[0].style.borderTop="none";}elseif(steamrep.reputation.full.indexOf("CAUTION")!=-1){document.getElementsByClassName("rep-header")[0].style.backgroundColor="rgba(201, 129, 0, 0.25)";}elseif(steamrep.reputation.full.indexOf("ADMIN")!=-1){document.getElementsByClassName("rep-header")[0].style.backgroundColor="rgba(0, 201, 40, 0.25)";document.getElementsByClassName("rep-header")[0].style.border="2px solid green";document.getElementsByClassName("profile_header_bg_texture")[0].style.border="2px solid green";document.getElementsByClassName("profile_content")[0].style.border="2px solid green";document.getElementsByClassName("profile_content")[0].style.borderTop="none";}elseif(steamrep.reputation.full.indexOf("TRUSTED")!=-1){document.getElementsByClassName("rep-header")[0].style.backgroundColor="rgba(0, 201, 177, 0.25)";}elseif(steamrep.reputation.full.indexOf("MIDDLEMAN")!=-1){document.getElementsByClassName("rep-header")[0].style.backgroundColor="rgba(0, 201, 177, 0.25)";}elseif(steamrep.reputation.full.indexOf("DONATOR")!=-1){document.getElementsByClassName("rep-header")[0].style.backgroundColor="rgba(0, 105, 201, 0.25)";}};srequest.send();}elseif(window.location.href.indexOf("/linkfilter/?url=")!=-1){// Link filtervarurl=document.getElementsByClassName("url")[0].innerText;varparsed="http://"+SteamCommunitySuite.ParseUrl(url).hostname,frag=parsed.replace(/[^.]*\.(?=\w+\.\w+$)/,'').replace("http://","").replace("https://","");varcontainer=document.getElementsByClassName("warningExplanation")[0];if(window.localStorage['neverAskAgain']&&document.querySelectorAll(".friendlyInterstital > .warningSign").length>=1){container.innerHTML="<div style='font-size:26px;text-align:center;'>Redirecting...</div>";window.location=url;}elseif(SteamCommunitySuite.RememberedDomains.indexOf(frag)!=-1){// Go!container.innerHTML="<div style='font-size:26px;text-align:center;'>Site already remembered.<br/><br/>Redirecting...</div>";window.location=url;}else{if(document.querySelectorAll(".friendlyInterstital > .warningSign").length>=1){varButtonContainer=document.getElementById("warningActions");ButtonContainer.innerHTML+="<a style=\"margin-top:8px;\" onclick=\"SteamCommunitySuite.RememberSite('"+url+"')\" id=\"rememberButton\" href=\"javascript:void(0);\" class=\"btn_grey_white_innerfade btn_medium\"><span>Continue & Never ask me again for this domain</span></a>";ButtonContainer.innerHTML+="<a style=\"margin-top:8px;\" onclick=\"SteamCommunitySuite.NeverAskAgain('"+url+"')\" id=\"rememberButton2\" href=\"javascript:void(0);\" class=\"btn_grey_white_innerfade btn_medium\"><span>Continue & Never ask again for any domain</span></a><br/><small>Phishing sites will always be blocked no matter what option you use.</small>";}}}}if(document.getElementById("market_buynow_dialog_accept_ssa")!=undefined){document.getElementById("market_buynow_dialog_accept_ssa").checked=true;}this.Log("Verified Valve Site <3");}else{if(window.location.href.indexOf("https://web.archive.org/web/20141010155000/http://forums.sourceop.com/")!=0){// Stupid SourceOP Forums using Steam's CDN// Fake!!!!this.Log("Fake valve site!");varValveFakeSiteBox="";ValveFakeSiteBox+="<div id=\"steam_blocked_modal\" style=\"font-family:Arial,sans-serif !important;display:block;opacity:1 !important;background:rgba(0,0,0,.8);z-index:999999;position:fixed;top:0px;left:0px;width:100%;height:100%;\">";ValveFakeSiteBox+=" <div style=\"display:block;opacity:1 !important;box-shadow: 0px 0px 6px #000 inset;z-index:99999;width:600px;margin:auto;margin-top:300px;text-align:center;color:#FFF;border:5px solid #000;border-color:red;background:rgba(255,0,0,.4);padding:30px;font-size:16px;border-radius:12px;\">";ValveFakeSiteBox+=" <h1 style='font-family:Arial,sans-serif !important;color:#FFF !important;font-size:30px !important;font-weight:bold !important;'>DANGER!</h1>This is <b>NOT</b> an official Valve website!<br/>";ValveFakeSiteBox+=" This is most likely a phishing attempt and you should get out NOW!<br/><br/>";ValveFakeSiteBox+=" <span style=\"font-size:12px;\">Alternatively, If you <i>really</i> want to see this site <a href=\"#\" onclick=\"document.getElementById('steam_blocked_modal').style.display='none';\" >click here.</a><br/>If you this this is incorrect <a href='mailto:[email protected]?Subject=Steam%20Community%20Suite%20Report'>report it to me here</a></span>";ValveFakeSiteBox+=" </div>";ValveFakeSiteBox+="</div>";document.body.innerHTML+=ValveFakeSiteBox;}}}// end ValveSite// Steam Trades & Offersif(window.location.href.indexOf("steamcommunity.com/tradeoffer/new/")!=-1||window.location.href.indexOf("steamcommunity.com/trade/")!=-1){// Dump page buttondocument.getElementById("inventory_box").getElementsByClassName("trade_box_contents")[0].getElementsByClassName("trade_rule")[0].insertAdjacentHTML('beforebegin',"<a style='position: relative;left: 299px;top: 7px;' class='pagecontrol_element pagebtn' href='javascript:SteamCommunitySuite.DumpPageToTrade();' >Dump page</a>");}this.Log("Load Successful.");},NeverAskAgain: function(url){if(window.localStorage){window.localStorage['neverAskAgain']=true;}window.location=url;},RememberSite: function(url){varparsed="http://"+SteamCommunitySuite.ParseUrl(url).hostname,frag=parsed.replace(/[^.]*\.(?=\w+\.\w+$)/,'').replace("http://","").replace("https://","");SteamCommunitySuite.RememberedDomains.push(frag);if(window.localStorage){window.localStorage['rememberedDomains']=JSON.stringify(SteamCommunitySuite.RememberedDomains);}window.location=url;},DumpPageToTrade: function(){varInvPage=document.getElementById("inventory_"+unsafeWindow.g_steamID+"_"+unsafeWindow.g_ActiveInventory.appid+"_2").getElementsByClassName("inventory_page")[parseInt(document.getElementById('pagecontrol_cur').innerHTML-1)];InvPage=InvPage.children;for(vari=InvPage.length-1;i>=0;i--){if(InvPage[i].style.display!="none"){varx=InvPage[i].querySelectorAll("a");for(varf=x.length-1;f>=0;f--){if(x[f].href!=undefined&&x[f].href.indexOf("steamcommunity.com")==-1)continue;unsafeWindow.MoveItemToTrade(InvPage[i]);};}};}}// Load ScriptunsafeWindow.SteamCommunitySuite=SteamCommunitySuite||{};unsafeWindow.SteamCommunitySuite.Load();
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I want to use this in the official steam client so i need userscript like you had before:
https://web.archive.org/web/20150509061214/https://jes.re/suite
https://web.archive.org/web/*/https://jes.re/suite.user.js
https://web.archive.org/web/*/http://jes.re/steam.css
The text was updated successfully, but these errors were encountered: