Last active 1741880397

export_blocked.js Raw
1// ==UserScript==
2// @name Export Blocked Steam Players
3// @version 1.0
4// @description Adds a button to export all blocked players
5// @author Jackz
6// @match http*://steamcommunity.com/id/*/friends/blocked
7// @grant GM_setClipboard
8// @grant GM_getValue
9// @grant GM_setValue
10// @grant GM_listValues
11// @downloadURL https://gist.githubusercontent.com/Jackzmc/1cd07cc9e1401ef78c87d45f6450ae84/raw/517541eeaee64f8864f899c4a91d07458389f8f8/export_blocked.js
12// @updateURL https://gist.githubusercontent.com/Jackzmc/1cd07cc9e1401ef78c87d45f6450ae84/raw/517541eeaee64f8864f899c4a91d07458389f8f8/export_blocked.js
13// ==/UserScript==
14(async function() {
15 document.getElementsByClassName("title_bar")[0].insert("<div class=\"btnv6_blue_hoverfade btn_small btn_uppercase\" id=\"export-btn\">Export</div>&nbsp;")
16 document.getElementById('export-btn').addEventListener('click', () => {
17 const items = [];
18 for(const item of document.getElementsByClassName("selectable")) {
19 items.push(item.attributes['data-steamid'].textContent)
20 }
21 GM_setClipboard(JSON.stringify(items), "text");
22 var a = document.createElement("a");
23 a.href = "data:application/json," + JSON.stringify(items);
24 a.download = "banned_users.json";
25 a.click();
26 })
27})();