Created
November 22, 2015 10:56
-
-
Save korden32/b1d8971e6edbafbf63c5 to your computer and use it in GitHub Desktop.
This file contains 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 Profile/Group permalinks | |
// @version 0.2.0 | |
// @author KorDen | |
// @grant none | |
// @include *//steamcommunity.com/id/* | |
// @include *//steamcommunity.com/profiles/* | |
// @include *//steamcommunity.com/groups/* | |
// @include *//steamcommunity.com/gid/* | |
// ==/UserScript== | |
( function() { | |
var chatB = $J('.joinchat_bg'); | |
var abuseId = document.getElementsByName("abuseID"); | |
if(chatB.length > 0) { | |
gId = chatB.attr('onclick').match(/\d+/)[0]; | |
var html = '<a href="//steamcommunity.com/gid/'+ gId + '">Permalink</a> | '; | |
if($J('#leave_group_form, .grouppage_pending_invite_description').length > 0) | |
html += '<a href="//steamcommunity.com/gid/'+ gId + '/history">History</a> | '; | |
html += '<a href="steam://friends/joinchat/'+ gId + '">Chat</a><br>\ | |
<br>Group ID: <input type=text value=' + gId + ' size=17 readonly><br><br>' | |
$J('.membercounts:last').before(html); | |
} else if(abuseId.length > 0) { | |
var steamId = abuseId[0].value; | |
$J('div.profile_rightcol').prepend('<div><a href="//steamcommunity.com/profiles/' + steamId + '">Permalink</a> | \ | |
<a href="javascript:ShowNicknameModal();">Add nickname</a><br>\ | |
<a href="//steamcommunity.com/profiles/' + steamId + '/posthistory">Post history</a> | \ | |
<a href="//steamcommunity.com/profiles/' + steamId + '/namehistory">Name history</a><br>\ | |
<a href="https://steamrep.com/profiles/' + steamId + '" style="color:#d09070;" target=_blank>SteamRep</a><br>\ | |
SteamID: <input type=text value='+ steamId + ' size=19 readonly><br><br>\</div>'); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment