Last active 1741880397

jackz's Avatar jackz revised this gist 1741880397. Go to revision

No changes

jackz's Avatar Jackz revised this gist 1614487553. Go to revision

1 file changed, 2 insertions

export_blocked.js

@@ -8,6 +8,8 @@
8 8 // @grant GM_getValue
9 9 // @grant GM_setValue
10 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
11 13 // ==/UserScript==
12 14 (async function() {
13 15 document.getElementsByClassName("title_bar")[0].insert("<div class=\"btnv6_blue_hoverfade btn_small btn_uppercase\" id=\"export-btn\">Export</div>&nbsp;")

jackz's Avatar Jackz revised this gist 1614487360. Go to revision

1 file changed, 25 insertions

export_blocked.js(file created)

@@ -0,0 +1,25 @@
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 + })();
Newer Older