您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a button to join the steam group for each steam group search result.
// ==UserScript== // @name Steam Community - Add Direct Join Group To Search // @namespace Royalgamer06 // @version 1.0 // @description Adds a button to join the steam group for each steam group search result. // @author Royalgamer06 // @include /^http(s)?\:\/\/steamcommunity\.com\/search.+/ // @grant none // @run-at document-start // @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js // ==/UserScript== $("body").on("click", ".joingroup", function(ev) { let btn = $(this).parent(); $(btn).html("Joining..."); $.post($(btn).parent().find(".searchPersonaName").attr("href"), { action: "join", sessionID: g_sessionID }, function(data) { if ($(".error_ctn", data).length > 0) { $(btn).html("Failed to join"); } else { $(btn).html("Successfully joined"); } }); }).on("DOMNodeInserted", ".search_row", function() { if ($(this).find(".joinGroupArea, .search_gamegroup_avatar_holder").length === 0 && $(this).hasClass("group")) { $(this).find(".searchPersonaInfo").append('<div style="padding-top: 12px;" class="joinGroupArea"><a class="btn_green_white_innerfade btn_medium joingroup"><span>Join Group</span></a></div>'); } });