Skip to content

Instantly share code, notes, and snippets.

@sifisifi
Last active September 19, 2020 08:29
Show Gist options
  • Save sifisifi/7bf0799f2109618c3c27 to your computer and use it in GitHub Desktop.
Save sifisifi/7bf0799f2109618c3c27 to your computer and use it in GitHub Desktop.
redditの初期購読サブレを全部解除するjavascript

redditを開いてからロケーションバー(アドレスバー・オムニボックス)に、javascript:と入力し、それに続けて下記のコードをコピペしてEnterを押して実行して下さい。(※redditを開いているタブのロケーションバーに入力、コピペして下さい)
OAuthの方のAPI RateLimitに合わせて、1秒毎に1つずつ解除していきます。

(function(){!function(){var t=["t5_2r0ij","t5_2qh7a","t5_2qh1i","t5_2qm4e","t5_2qh1o","t5_2qh49","t5_2qh4i","t5_2raed","t5_2tk95","t5_2qh7d","t5_2qhlh","t5_2sbq3","t5_2sokd","t5_2qhx4","t5_2qh55","t5_2qh33","t5_2t7no","t5_2qgzt","t5_2qh03","t5_2rmfx","t5_2qt55","t5_2qh53","t5_2qzb6","t5_2ul7u","t5_2qh72","t5_2s5oq","t5_2qxzy","t5_2ti4h","t5_2qh3s","t5_2qh1u","t5_2qh3l","t5_2rm4d","t5_2qnts","t5_2tycb","t5_2qstm","t5_2qh5b","t5_2tecy","t5_2qh0u","t5_mouw","t5_2szyo","t5_2qh87","t5_2qgzy","t5_2qh6e","t5_2to41","t5_2qqjc","t5_2r2jt","t5_2u3ta","t5_2qh1e","t5_2qh13","t5_2s3nb"],_=function(){var t=document.createElement("div"),_=t.style;return _.backgroundColor="#fefefe",_.position="fixed",_.top="50%",_.left="35%",_.width="30%",_.height="50px",_.lineHeight="50px",_.textAlign="center",_.border="1px solid gray",_.borderRadius="3px",_.boxShadow="2px 2px 1px rgba(55,55,55,0.3)",document.body.appendChild(t),t},e=_(),q=function(){document.body.removeChild(e)},h=function(_){e.innerHTML="初期購読subredditの購読解除中("+_+"/"+t.length+"完了)"},o=0,n=function(){o<t.length?(h(o+1),unsubscribe(t[o])(),++o,setTimeout(n,1e3)):q()};n()}();})();

最終的にロケーションバーの中の文字列が以下の様になっていればOKです。

javascript:(function(){!function(){var t=["t5_2r0ij","t5_2qh7a","t5_2qh1i","t5_2qm4e","t5_2qh1o","t5_2qh49","t5_2qh4i","t5_2raed","t5_2tk95","t5_2qh7d","t5_2qhlh","t5_2sbq3","t5_2sokd","t5_2qhx4","t5_2qh55","t5_2qh33","t5_2t7no","t5_2qgzt","t5_2qh03","t5_2rmfx","t5_2qt55","t5_2qh53","t5_2qzb6","t5_2ul7u","t5_2qh72","t5_2s5oq","t5_2qxzy","t5_2ti4h","t5_2qh3s","t5_2qh1u","t5_2qh3l","t5_2rm4d","t5_2qnts","t5_2tycb","t5_2qstm","t5_2qh5b","t5_2tecy","t5_2qh0u","t5_mouw","t5_2szyo","t5_2qh87","t5_2qgzy","t5_2qh6e","t5_2to41","t5_2qqjc","t5_2r2jt","t5_2u3ta","t5_2qh1e","t5_2qh13","t5_2s3nb"],_=function(){var t=document.createElement("div"),_=t.style;return _.backgroundColor="#fefefe",_.position="fixed",_.top="50%",_.left="35%",_.width="30%",_.height="50px",_.lineHeight="50px",_.textAlign="center",_.border="1px solid gray",_.borderRadius="3px",_.boxShadow="2px 2px 1px rgba(55,55,55,0.3)",document.body.appendChild(t),t},e=_(),q=function(){document.body.removeChild(e)},h=function(_){e.innerHTML="初期購読subredditの購読解除中("+_+"/"+t.length+"完了)"},o=0,n=function(){o<t.length?(h(o+1),unsubscribe(t[o])(),++o,setTimeout(n,1e3)):q()};n()}();})();

動作確認: Firefox, Google Chrome


RES利用者の方へ

RESを使用していると、購読してもすぐにはMY SUBREDDITSに反映されないと思います。
その場合は.(ドット)を押して出てくるコンソール(?)にRESStorage remove RESmodules.subredditManager.subreddits.ユーザー名を入力して実行した後に、Ctrl + Shift + Rを押してMY SUBREDDITSを更新して下さい。


以下宣伝

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