Last active
November 21, 2022 00:07
-
-
Save MalikAQayum/237ca9687512c50fd1c87e16f7c89c3c to your computer and use it in GitHub Desktop.
adds the ability to send a message to someone that is not your friend, through the "more" button on the steam profile.
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 Send a Message | |
// @namespace MalikQayum | |
// @version 0.3 | |
// @description adds the ability to send a message to someone that is not your friend, through the "more" button on the steam profile. | |
// @author MalikQayum | |
// @include /^https?://steamcommunity\.com/(id|profiles)/*/ | |
// @grant none | |
// ==/UserScript== | |
if ( $J( "#btn_add_friend" ).length || $J( "#btn_accept_friend" ).length ) { | |
var container = document.querySelector( '.popup_body.popup_menu.shadow_content' ), | |
url = "javascript:OpenFriendChat( '"+g_rgProfileData.steamid+"', 0 );", | |
image, | |
element; | |
if( container ) | |
{ | |
image = document.createElement( 'img' ); | |
image.className = '.popup_menu_item'; | |
image.src = 'https://steamcommunity-a.akamaihd.net/public/images/skin_1/icon_btn_comment.png'; | |
element = document.createElement( 'a' ); | |
element.href = url; | |
element.className = 'popup_menu_item'; | |
element.appendChild( image ); | |
element.appendChild( document.createTextNode( '\u00a0 Send a Message' ) ); | |
container.insertBefore( element, null ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment