mcdouglasx (OP)
|
 |
June 17, 2025, 12:29:46 AM |
|
I don't know if everyone here shares my opinion, but sometimes we want clean navigation of things we don't care about, like languages we don't understand or areas of the forum we don't feel like visiting. But when we go to unread topics, we find a jumble of all the posts mixed together, which makes things difficult, and sometimes we miss posts we're interested in because of the jumble of topics. That's why I've been using this Userscript with Tampermonkey to hide the boards I don't want to see and show me only what I'm interested in. I don't know if there's an easier way to do it, but it's working for me so far. To install it, just install the extension and open Tampermonkey. In the dashboard, select the + symbol, paste the code, and save it.. Then when you go to "Recent Unread Topics," you can click on " Show filter"  A selection list will open for the topics you want to hide. Since there are so many subforums, I select the "Select All" option and only uncheck the ones that interest me. I adjust it depending on what I want.  Let's say you only want to see gambling. Select all, then uncheck " Gambling Discussion", apply changes, and you'll only see the posts you prefer.  I'm sharing the Userscript I use with the Tampermonkey extension. UserScript// ==UserScript== // @name Bitcointalk Board Filter // @version 1.1 // @description Filter topics from Bitcointalk's unread topics. // @author Mcdouglasx // @match https://bitcointalk.org/index.php?action=unread* // @grant GM_setValue // @grant GM_getValue // @run-at document-idle // ==/UserScript==
(function() { 'use strict';
const boardNames = { 1: "Bitcoin Discussion", 4: "Bitcoin Technical Support", 5: "Marketplace", 6: "Development & Technical Discussion", 7: "Economics", 8: "Trading Discussion", 9: "Off-topic", 10: "Pyccкий (Russian)", 11: "Other languages/locations", 12: "Project Development", 13: "Français", 14: "Mining", 16: "Deutsch (German)", 17: "Chinese students", 18: "Paзнoe", 19: "Юpиcты", 20: "Tpeйдepы", 21: "Maйнepы", 22: "Hoвички", 23: "Бизнec", 24: "Meta", 25: "Obsolete (buying)", 26: "Obsolete (selling)", 27: "Español (Spanish)", 28: "Italiano (Italian)", 29: "Português (Portuguese)", 30: "中文 (Chinese)", 31: "Mercado y Economía", 32: "Hardware y Minería", 33: "Esquina Libre", 34: "Politics & Society", 35: "Biete", 36: "Suche", 37: "Wallet software", 39: "Beginners & Help", 40: "Mining support", 41: "Pools", 42: "Mining software (miners)", 44: "CPU/GPU Bitcoin mining hardware", 45: "Skandinavisk", 46: "Mercato valute", 47: "Discussions générales et utilisation du Bitcoin", 48: "Mining et Hardware", 49: "Place de marché", 50: "Hors-sujet", 51: "Goods", 52: "Services", 53: "Currency exchange", 54: "Wiki, documentation et traduction", 55: "Xaйпы", 56: "Gambling", 57: "Speculation", 59: "Archival", 60: "Mining (Deutsch)", 61: "Trading und Spekulation", 62: "Anfänger und Hilfe", 63: "Projektentwicklung", 64: "Off-Topic (Deutsch)", 65: "Lending", 66: "Кoдepы", 67: "Altcoin Discussion", 69: "Economia & Mercado", 70: "Mineração em Geral", 71: "Games and rounds", 72: "Aльтepнaтивныe кpиптoвaлюты", 73: "Auctions", 74: "Legal", 75: "Computer hardware", 76: "Hardware", 77: "Press", 78: "Securities", 79: "Nederlands (Dutch)", 80: "Markt", 81: "Mining speculation", 82: "한국어 (Korean)", 83: "Scam Accusations", 84: "Service Announcements", 85: "Service Discussion", 86: "Meetups", 87: "Important Announcements", 88: "Long-term offers", 89: "India", 90: "Идeи", 91: "Пoлитикa", 92: "Кopзинa", 93: "Digital goods", 94: "Gokken/lotterijen", 95: "עברית (Hebrew)", 97: "Armory", 98: "Electrum", 99: "MultiBit", 100: "Bitcoin Wallet for Android", 101: "Mercadillo", 102: "Mexico", 103: "Argentina", 104: "España", 105: "Centroamerica y Caribe", 107: "Beni", 108: "Română (Romanian)", 109: "Anunturi importante", 110: "Offtopic", 111: "Market", 112: "Tutoriale", 113: "Bine ai venit!", 114: "Presa", 115: "Mining (Italiano)", 116: "Mining (Nederlands)", 117: "跳蚤市场", 118: "山寨币", 119: "媒体", 120: "Eλληνικά (Greek)", 121: "Mining (India)", 122: "Marketplace (India)", 123: "Regional Languages (India)", 124: "Press & News from India", 125: "Alt Coins (India)", 126: "Buyer/ Seller Reputations (India)", 127: "Off-Topic (India)", 128: "Hoвocти", 129: "Reputation", 130: "Primeros pasos y ayuda", 131: "Primeiros Passos (Iniciantes)", 132: "Alt-Currencies (Italiano)", 133: "Türkçe (Turkish)", 134: "Brasil", 135: "Portugal", 136: "Aγoρά", 137: "Group buys", 138: "BitcoinJ", 139: "Treffen", 140: "Presse ", 141: "Auktionen", 142: "Polski", 143: "Beurzen", 144: "Raduni/Meeting (Italiano)", 145: "Off-Topic (Italiano)", 146: "挖矿", 147: "Alt Coins (Nederlands)", 148: "Off-topic (Nederlands)", 149: "Altcoins (Français)", 150: "Meetings (Nederlands)", 151: "Altcoins (criptomonedas alternativas)", 152: "Altcoins (Deutsch)", 153: "Guide (Italiano)", 155: "Pazar Alanı", 156: "Madencilik", 157: "Alternatif Kripto-Paralar", 158: "Konu Dışı", 159: "Announcements (Altcoins)", 160: "Mining (Altcoins)", 161: "Marketplace (Altcoins)", 162: "Accuse scam/truffe", 163: "Tablica ogłoszeń", 164: "Alternatywne kryptowaluty", 165: "Crittografia e decentralizzazione", 166: "Minerit", 167: "New forum software", 168: "Bitcoin Wiki", 169: "Progetti", 170: "Mercato", 171: "Servizi", 172: "Esercizi commerciali", 173: "Hardware/Mining (Italiano)", 174: "Yeni Başlayanlar & Yardım", 175: "Trading, analisi e speculazione", 176: "Annunci", 177: "Minería de altcoins", 178: "Anunturi Monede Alternative", 179: "Altcoins (Eλληνικά)", 180: "Bitcoin Haberleri", 181: "Criptomoedas Alternativas", 182: "대체코인 Alt Coins (한국어)", 183: "Actualité et News", 184: "Vos sites et projetos", 185: "Paбoтa", 186: "Développement et technique", 187: "Économie et spéculation", 188: "Le Bitcoin et la loi", 189: "Ekonomi", 190: "Servisler", 191: "Bahasa Indonesia (Indonesian)", 192: "Altcoins (Bahasa Indonesia)", 193: "Marketplace (Bahasa Indonesia)", 194: "Mining (Bahasa Indonesia)", 195: "Mining Discussion (Eλληνικά)", 196: "离题万里", 197: "Service Announcements (Altcoins)", 198: "Service Discussion (Altcoins)", 199: "Pools (Altcoins)", 200: "Gambling (Italiano)", 201: "Hrvatski (Croatian)", 202: "Servicios", 203: "Trading y especulación", 204: "Servicios", 205: "Discussioni avanzate e sviluppo", 206: "Desenvolvimento & Discussões Técnicas", 207: "Investor-based games", 208: "Débutants", 209: "Échanges", 210: "Produits et services", 211: "Petites annonces", 212: "Micro Earnings", 217: "Collectibles", 219: "Pilipinas", 220: "Trgovina", 221: "Altcoins (Hrvatski)", 222: "Web Wallets", 223: "Exchanges", 224: "Speculation (Altcoins)", 227: "Investigations", 228: "Gambling discussion", 229: "Proje Geliştirme", 230: "Buluşmalar", 231: "Mycelium", 232: "Fonlar", 234: "Invites & Accounts", 235: "Madencilik (Alternatif Kripto-Paralar)", 236: "Бapaxoлкa", 237: "Oбмeнники", 238: "Bounties (Altcoins)", 239: "Duyurular (Alternatif Kripto-Paralar)", 240: "Tokens (Altcoins)", 241: "العربية (Arabic)", 242: "العملات البديلة (Altcoins)", 243: "Altcoins (Pilipinas)", 246: "Altcoin Announcements (Eλληνικά)", 247: "Altcoin Mining (Eλληνικά)", 248: "Toкeны", 250: "Serious discussion", 251: "Ivory Tower", 252: "日本語 (Japanese)", 253: "إستفسارات و أسئلة المبتدئين", 254: "Tokens (Español)", 255: "アルトコイン", 256: "Бayнти и aиpдpoпы", 257: "Discutii Servicii", 258: "Annonces", 259: "Altcoins (Monede Alternative)", 260: "Altcoin Announcements (Pilipinas)", 261: "Hardware wallets", 262: "Oбcyждeниe Bitcoin (Russian)", 263: "Nowe kryptowaluty i tokeny", 264: "Tablica ogłoszeń (altcoiny)", 265: "النقاشات", 266: "التعدين", 267: "النقاشات الأخرى", 268: "Pamilihan", 269: "Marktplatz", 270: "Announcements (Deutsch)", 271: "منصات التبادل", 272: "Off-topic (Hrvatski)", 273: "Announcements (Hrvatski)", 274: "Others (Pilipinas)", 275: "Nigeria (Naija)", 276: "Trading dan Spekulasi", 277: "Ekonomi, Politik, dan Budaya", 278: "Topik Lainnya", 279: "Politics and society (Naija)", 280: "Off-topic (Naija)" };
let hiddenSubforums = {}; let checkboxes = {}; let isCollapsed = true;
function loadPref() { try { const stored = GM_getValue('hiddenSubforums', '{}'); hiddenSubforums = JSON.parse(stored); isCollapsed = GM_getValue('isCollapsed', true); } catch (e) { hiddenSubforums = {}; isCollapsed = true; } }
function savePref() { GM_setValue('hiddenSubforums', JSON.stringify(hiddenSubforums)); GM_setValue('isCollapsed', isCollapsed); }
function get_Id(row) { const linkElement = row.querySelector('td:nth-child(3) span.smalltext a[href*="board="]'); if (linkElement) { const href = linkElement.href; const match = href.match(/board=(\d+)/); if (match && match[1]) { return parseInt(match[1], 10); } } return null; }
function applyFilter() { Object.keys(checkboxes).forEach(id => { hiddenSubforums[id] = checkboxes[id].checked; });
savePref(); hideTopics(); }
function hideTopics() { const mainTable = document.querySelector('table.bordercolor[cellspacing="1"][cellpadding="4"]'); if (!mainTable) return;
const rows = mainTable.querySelectorAll('tr:not(.titlebg)');
rows.forEach(row => { const boardId = get_Id(row); const shouldHide = boardId && hiddenSubforums[boardId]; row.style.display = shouldHide ? 'none' : ''; }); }
function restoreDefaults() { Object.keys(checkboxes).forEach(id => { checkboxes[id].checked = false; }); hiddenSubforums = {}; savePref(); hideTopics(); alert('Filters restored to default values'); }
function selectAll() { Object.values(checkboxes).forEach(checkbox => { checkbox.checked = true; }); }
function toggleCollapse() { isCollapsed = !isCollapsed; savePref(); updateCollapseState(); }
function updateCollapseState() { const content = document.getElementById('filterContent'); const toggleBtn = document.getElementById('toggleBtn');
if (isCollapsed) { content.style.display = 'none'; toggleBtn.innerHTML = '▶ Show Filter'; toggleBtn.style.backgroundColor = '#3a6ea5'; } else { content.style.display = 'block'; toggleBtn.innerHTML = '▼ Hide Filter'; toggleBtn.style.backgroundColor = '#2d5580'; } }
function FilterUI() { const container = document.createElement('div'); container.id = 'subforumFilter'; container.style.cssText = ` background: #e9f1f6; /* Bitcointalk header background */ padding: 8px; margin: 10px 0; border: 1px solid #c9d2d9; /* Bitcointalk border color */ border-radius: 3px; color: #000; font-family: Verdana, sans-serif; font-size: 13px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); `;
const header = document.createElement('div'); header.style.display = 'flex'; header.style.justifyContent = 'space-between'; header.style.alignItems = 'center'; header.style.marginBottom = '5px';
const title = document.createElement('h3'); title.textContent = 'Board Filter'; title.style.margin = '0'; title.style.color = '#333'; title.style.fontSize = '14px'; title.style.fontWeight = 'bold';
const toggleBtn = document.createElement('button'); toggleBtn.id = 'toggleBtn'; toggleBtn.style.cssText = ` padding: 4px 8px; background: #3a6ea5; /* Bitcointalk blue */ color: white; border: none; border-radius: 3px; cursor: pointer; font-size: 11px; font-weight: bold; transition: background 0.2s; `; toggleBtn.addEventListener('mouseover', () => { toggleBtn.style.backgroundColor = '#2d5580'; }); toggleBtn.addEventListener('mouseout', () => { toggleBtn.style.backgroundColor = isCollapsed ? '#3a6ea5' : '#2d5580'; });
header.appendChild(title); header.appendChild(toggleBtn); container.appendChild(header);
const content = document.createElement('div'); content.id = 'filterContent'; content.style.display = 'none';
const grid = document.createElement('div'); grid.style.display = 'grid'; grid.style.gridTemplateColumns = 'repeat(auto-fill, minmax(200px, 1fr))'; grid.style.gap = '8px'; grid.style.maxHeight = '300px'; grid.style.overflowY = 'auto'; grid.style.padding = '5px'; grid.style.marginBottom = '10px'; grid.style.border = '1px solid #c9d2d9'; grid.style.borderRadius = '3px'; grid.style.background = '#fff';
Object.entries(boardNames).sort((a, b) => a[1].localeCompare(b[1])).forEach(([id, name]) => { const label = document.createElement('label'); label.style.display = 'flex'; label.style.alignItems = 'center'; label.style.marginBottom = '4px'; label.style.fontSize = '12px'; label.style.color = '#333';
const checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.value = id; checkbox.checked = hiddenSubforums[id] || false; checkbox.style.marginRight = '6px';
checkboxes[id] = checkbox;
label.appendChild(checkbox); label.appendChild(document.createTextNode(name)); grid.appendChild(label); });
content.appendChild(grid);
const buttonContainer = document.createElement('div'); buttonContainer.style.display = 'flex'; buttonContainer.style.gap = '8px'; buttonContainer.style.flexWrap = 'wrap';
const applyButton = document.createElement('button'); applyButton.textContent = 'Apply Changes'; applyButton.style.cssText = ` padding: 6px 12px; background: #3a6ea5; /* Bitcointalk blue */ color: white; border: none; border-radius: 3px; cursor: pointer; font-size: 12px; font-weight: bold; transition: background 0.2s; `; applyButton.addEventListener('click', applyFilter); applyButton.addEventListener('mouseover', () => { applyButton.style.backgroundColor = '#2d5580'; }); applyButton.addEventListener('mouseout', () => { applyButton.style.backgroundColor = '#3a6ea5'; });
const selectAllButton = document.createElement('button'); selectAllButton.textContent = 'Select All'; selectAllButton.style.cssText = ` padding: 6px 12px; background: #5a7fa5; /* Lighter blue */ color: white; border: none; border-radius: 3px; cursor: pointer; font-size: 12px; font-weight: bold; transition: background 0.2s; `; selectAllButton.addEventListener('click', selectAll); selectAllButton.addEventListener('mouseover', () => { selectAllButton.style.backgroundColor = '#4a6f95'; }); selectAllButton.addEventListener('mouseout', () => { selectAllButton.style.backgroundColor = '#5a7fa5'; });
const restoreButton = document.createElement('button'); restoreButton.textContent = 'Restore Defaults'; restoreButton.style.cssText = ` padding: 6px 12px; background: #888; color: white; border: none; border-radius: 3px; cursor: pointer; font-size: 12px; font-weight: bold; transition: background 0.2s; `; restoreButton.addEventListener('click', restoreDefaults); restoreButton.addEventListener('mouseover', () => { restoreButton.style.backgroundColor = '#777'; }); restoreButton.addEventListener('mouseout', () => { restoreButton.style.backgroundColor = '#888'; });
buttonContainer.appendChild(applyButton); buttonContainer.appendChild(selectAllButton); buttonContainer.appendChild(restoreButton); content.appendChild(buttonContainer);
container.appendChild(content); toggleBtn.addEventListener('click', toggleCollapse);
return container; }
function init() { loadPref();
const bodyArea = document.getElementById('bodyarea'); if (!bodyArea) return;
const filterUI = FilterUI(); bodyArea.insertBefore(filterUI, bodyArea.firstChild);
updateCollapseState(); hideTopics(); }
if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } })(); Disclaimer: If these types of tools are prohibited on the forum, please feel free to delete the post, and I'll stop using them. I apologize in advance.
|