// ==UserScript==
// @name Export Blocked Steam Players
// @version 1.0
// @description Adds a button to export all blocked players
// @author Jackz
// @match http*://steamcommunity.com/id/*/friends/blocked
// @grant GM_setClipboard
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_listValues
// ==/UserScript==
(async function() {
document.getElementsByClassName("title_bar")[0].insert("
Export
")
document.getElementById('export-btn').addEventListener('click', () => {
const items = [];
for(const item of document.getElementsByClassName("selectable")) {
items.push(item.attributes['data-steamid'].textContent)
}
GM_setClipboard(JSON.stringify(items), "text");
var a = document.createElement("a");
a.href = "data:application/json," + JSON.stringify(items);
a.download = "banned_users.json";
a.click();
})
})();