Last active
February 11, 2022 17:05
-
-
Save RandyMcMillan/71c182c9c59bced1c76dc40fc0ea1e70 to your computer and use it in GitHub Desktop.
Mute shitcoins on twitter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//navigate to https://twitter.com/settings/muted_keywords | |
//past this into the web browser console | |
const delayMs = 500; // change this if you feel like its running too fast | |
const keywords = `Ethereum | |
Ripple | |
XRP | |
BCH | |
BCHSV | |
BSV | |
Litecoin | |
LTC | |
EOS | |
Binance | |
BNB | |
Tezos | |
XTZ | |
OKB | |
Cardano | |
ADA | |
ChainLink | |
LINK | |
Stellar | |
XLM | |
Monero | |
XMR | |
Tron | |
TRX | |
Huobi | |
HT | |
ETC | |
NEO | |
Dash | |
LEO | |
Cosmos Atoms | |
ATOM | |
IOTA | |
MIOTA | |
Ontology | |
ONT | |
Zcash | |
ZEC | |
Maker | |
MKR | |
NEM | |
XEM | |
VeChain | |
VET | |
BAT | |
Dogecoin | |
DOGE | |
Qtum | |
QTUM | |
Lisk | |
LSK | |
Decred | |
DCR | |
Paxos Standard | |
PAX | |
Algorand | |
ALGO | |
ICON | |
ICX | |
BTG | |
Ravencoin | |
RVN | |
0x | |
ZRX | |
MonaCoin | |
MONA | |
OmiseGo | |
OMG | |
Hedera | |
Hashgraph | |
HBAR | |
Bytom | |
BTM | |
BCD | |
Augur | |
REP | |
Siacoin | |
SC | |
Theta Network | |
THETA | |
Waves | |
WAVES | |
True USD | |
TUSD | |
Holo | |
HOT | |
Enjin | |
ENJ | |
Nano | |
NANO | |
Gatechain | |
GT | |
Dai | |
DAI | |
NEXO | |
NEXO | |
BitTorrent | |
BTT | |
KuCoin | |
KCS | |
Horizen ZEN Horizen ZEN | |
V Systems | |
VSYS | |
DigixDAO | |
DGD | |
DigiByte | |
DGB | |
Bytecoin | |
BCN | |
Komodo | |
KMD | |
Nervos Network CKB | |
HShare | |
HSR | |
BitShares | |
BTS | |
Crypto.com | |
MCO | |
Havven | |
HAV | |
Blockstack | |
STX | |
Decentraland | |
MANA | |
FTX | |
FTT | |
IOStoken | |
IOST | |
Steem | |
STEEM | |
Verge | |
XVG | |
DxChain | |
DX | |
Zilliqa | |
ZIL | |
Kyber Network | |
KNC | |
Swipe | |
SXP | |
Aeternity | |
AE | |
Status | |
SNT | |
Golem | |
GNT | |
Celsius Network | |
CEL | |
Ardor | |
ARDR | |
Chiliz | |
CHZ | |
ZCoin | |
XZC | |
Seele | |
SEELE | |
BTMX | |
Aelf | |
ELF | |
Matic Network | |
MATIC | |
Pundi X | |
NPXS | |
Republic Protocol | |
REN | |
Lambda | |
LAMB | |
RSK Infrastructure Framework | |
RIF | |
Aion | |
AION | |
WAX | |
Handshake | |
HNS | |
Stratis | |
STRAT | |
IExec | |
RLC`.split(/\W+/); | |
const nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value").set; | |
const addMutedKeyword = keyword => { | |
const input = document.querySelector("[name='keyword']"); | |
nativeInputValueSetter.call(input, keyword); | |
input.dispatchEvent(new Event('input', { bubbles: true })); | |
document.querySelector("[data-testid='settingsDetailSave']").click(); | |
} | |
const delay = () => { | |
return new Promise(res => setTimeout(res, delayMs)); | |
}; | |
keywords.reduce(async (prev, keyword) => { | |
await prev; | |
document.querySelector("a[href='/settings/add_muted_keyword']").click(); | |
await delay(); | |
addMutedKeyword(keyword); | |
return delay(); | |
}, Promise.resolve()); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Idk if this used to work without conflict or not, but when I run it, after a while it tells me I've "already muted X word" (due to the muted words being case insensitive). It also adds phrases word by word instead of all in one "muted word" (idk either javascript or regex well enough to fix this so I ran the list with only single word entries and then added the rest manually). I revised the terms in a way that should allow the script to run without conflict (provided the split error gets fixed):