Skip to content

Instantly share code, notes, and snippets.

@RandyMcMillan
Last active February 11, 2022 17:05
Show Gist options
  • Save RandyMcMillan/71c182c9c59bced1c76dc40fc0ea1e70 to your computer and use it in GitHub Desktop.
Save RandyMcMillan/71c182c9c59bced1c76dc40fc0ea1e70 to your computer and use it in GitHub Desktop.
Mute shitcoins on twitter
//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());
@LeviSnoot
Copy link

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):

0x
ADA
AE
Aelf
Aeternity
AION
ALGO
Algorand
Ardor
ARDR
ATOM
Augur
BAT
BCD
BCH
BCHSV
BCN
Binance
BitShares
BitTorrent
Blockstack
BNB
BSV
BTG
BTM
BTMX
BTS
BTT
Bytecoin
Bytom
Cardano
CEL
Celsius Network
ChainLink
Chiliz
CHZ
Cosmos Atoms
Crypto.com
DAI
Dash
DCR
Decentraland
Decred
DGB
DGD
DigiByte
DigixDAO
DOGE
Dogecoin
DX
DxChain
ELF
ENJ
Enjin
EOS
ETC
Ethereum
FTT
FTX
Gatechain
GNT
Golem
GT
Handshake
Hashgraph
HAV
Havven
HBAR
Hedera
HNS
Holo
Horizen ZEN Horizen ZEN
HOT
HShare
HSR
HT
Huobi
ICON
ICX
IExec
IOST
IOStoken
IOTA
KCS
KMD
KNC
Komodo
KuCoin
Kyber Network
LAMB
Lambda
LEO
LINK
Lisk
Litecoin
LSK
LTC
Maker
MANA
MATIC
Matic Network
MCO
MIOTA
MKR
MONA
MonaCoin
Monero
NANO
NEM
NEO
Nervos Network CKB
NEXO
NPXS
OKB
OMG
OmiseGo
ONT
Ontology
PAX
Paxos Standard
Pundi X
QTUM
Ravencoin
REN
REP
Republic Protocol
RIF
Ripple
RLC
RSK Infrastructure Framework
RVN
SC
SEELE
Siacoin
SNT
Status
STEEM
Stellar
STRAT
Stratis
STX
Swipe
SXP
Tezos
THETA
Theta Network
Tron
True USD
TRX
TUSD
V Systems
VeChain
Verge
VET
VSYS
WAVES
WAX
XEM
XLM
XMR
XRP
XTZ
XVG
XZC
Zcash
ZCoin
ZEC
ZIL
Zilliqa
ZRX

@RandyMcMillan
Copy link
Author

I will check it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment