Last active 1741880397

Revision 517541eeaee64f8864f899c4a91d07458389f8f8

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// ==/UserScript==
12(async function() {
13 document.getElementsByClassName("title_bar")[0].insert("<div class=\"btnv6_blue_hoverfade btn_small btn_uppercase\" id=\"export-btn\">Export</div>&nbsp;")
14 document.getElementById('export-btn').addEventListener('click', () => {
15 const items = [];
16 for(const item of document.getElementsByClassName("selectable")) {
17 items.push(item.attributes['data-steamid'].textContent)
18 }
19 GM_setClipboard(JSON.stringify(items), "text");
20 var a = document.createElement("a");
21 a.href = "data:application/json," + JSON.stringify(items);
22 a.download = "banned_users.json";
23 a.click();
24 })
25})();