Steam Community - Chat Dropdown

Adds dropdown menu in steam profile pages with options to chat through web or steam client

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Steam Community - Chat Dropdown
// @namespace    Royalgamer06
// @version      0.3
// @description  Adds dropdown menu in steam profile pages with options to chat through web or steam client
// @author       Royalgamer06
// @include      /(http|https)\:\/\/steamcommunity.com\/(id|profiles)\/.+/
// @exclude      /(http|https)\:\/\/steamcommunity.com\/(id|profiles)\/.+\/.+/
// @grant        none
// ==/UserScript==

if (jQuery("div.profile_header_actions > a[href*=LaunchWebChat]").length > 0) {
    var steamid = g_rgProfileData.steamid;
    var href = jQuery('div.profile_header_actions > a').attr('href');
    var html = '<span class="btn_profile_action btn_medium" id="profile_chat_dropdown_link" onclick="ShowMenu( this, \'profile_chat_dropdown\', \'right\' );"> <span>Send a Message <img src="http://steamcommunity-a.akamaihd.net/public/images/profile/profile_action_dropdown.png"></span> </span><div class="popup_block" id="profile_chat_dropdown" style="visibility: visible; top: 168px; left: 679px; display: none; opacity: 1;"> <div class="shadow_ul"></div> <div class="shadow_top"></div> <div class="shadow_ur"></div> <div class="shadow_left"></div> <div class="shadow_right"></div> <div class="shadow_bl"></div> <div class="shadow_bottom"></div> <div class="shadow_br"></div> <div class="popup_body popup_menu shadow_content"> <a class="popup_menu_item" href="' + href + '"><img src="//steamcommunity-a.akamaihd.net/public/images/skin_1/icon_btn_comment.png">&nbsp; Web browser chat</a> <a class="popup_menu_item" href="steam://friends/message/' + steamid + '"><img src="//steamcommunity-a.akamaihd.net/public/images/skin_1/icon_btn_comment.png">&nbsp; Steam Client chat</a> </div> </div>';
    jQuery('div.profile_header_actions > a').replaceWith(html);
}