「スクリプト保管庫」の編集履歴(バックアップ)一覧はこちら
「スクリプト保管庫」(2023/01/15 (日) 16:33:16) の最新版変更点
追加された行は緑色になります。
削除された行は赤色になります。
[[おーぷん2ちゃんねる]]および[[おんJ]]の利用時に役立つスクリプトをまとめたページです。
主にブックマークレットに登録することで使用可能となります。
([[ブックマークレットの使い方についてはこちらの記事を参照してください。>https://www.lifehacker.jp/2013/04/130402bookmarklet_matome.html]])
#contents()
*ID無視機能拡張
#image(https://i.imgur.com/kVvhVVy.jpg)
[[外部サイト>http://let.hatelabo.jp/Awn/let/hJmetP7T1vVA]]
*「ttp」を「http」に直し、imgur以外もサムネイル表示する
[[構文>http://toro.open2ch.net/test/read.cgi/tech/1372630732/119]]
スレ表示後に実行して、マウスカーソルをURLの上に動かせばOK。
*スレ内でID毎のレス数を集計し、結果を降順で表示する
#image(https://i.imgur.com/4dz9KPm.jpg)
> javascript:alert([...[...document.querySelectorAll('._id')].reduce((a,n)=>((i=>a.set(i,(a.get(i)||0)+1))(n.getAttribute('val')),a),new Map).entries()].sort(([,a],[,b])=>b-a).join('\n'));
*統計ページをID数でソート & IDあたりの投稿数の追加
[[構文>http://toro.open2ch.net/test/read.cgi/tech/1372630732/92]]
*設定したNGワードに自動で反応してアク禁する(動作未確認・スレ主用)
#image(https://i.imgur.com/Gt24NpS.jpg)
[[外部サイト>http://let.hatelabo.jp/Awn/let/hLHWrMzj08dj]]
動作中の様子:[[自動アク禁のテストをしたいので書き込みしに来てください!>http://hayabusa.open2ch.net/test/read.cgi/news4vip/1483790401/]]
*順位スレのスレタイを自動生成(スレ主用)
[[外部リンク>https://greasyfork.org/ja/scripts/41087-jun-ithreadtitlegenerator]]
[[最新の順位表とクリンチナンバー>https://greasyfork.org/ja/scripts/41087-jun-ithreadtitlegenerator]]にアクセスした際、順位スレのスレタイを自動生成する。
*関連リンク
[[ブックマークレット(プログラム技術)>http://toro.open2ch.net/test/read.cgi/tech/1372630732/]]
おーぷん関連のスクリプトが投稿されている。
*コメント欄
#comment_num2()
----
&link_anchor(メニュー){▽}タグ一覧
&tags()
----
[[おーぷん2ちゃんねる]]および[[おんJ]]の利用時に役立つスクリプトをまとめたページです。
主にブックマークレットに登録することで使用可能となります。
([[ブックマークレットの使い方についてはこちらの記事を参照してください。>https://www.lifehacker.jp/2013/04/130402bookmarklet_matome.html]])
#contents()
*ID無視機能拡張
#image(https://i.imgur.com/kVvhVVy.jpg)
[[外部サイト>http://let.hatelabo.jp/Awn/let/hJmetP7T1vVA]]
*「ttp」を「http」に直し、imgur以外もサムネイル表示する
[[構文>http://toro.open2ch.net/test/read.cgi/tech/1372630732/119]]
スレ表示後に実行して、マウスカーソルをURLの上に動かせばOK。
*スレ内でID毎のレス数を集計し、結果を降順で表示する
#image(https://i.imgur.com/4dz9KPm.jpg)
> javascript:alert([...[...document.querySelectorAll('._id')].reduce((a,n)=>((i=>a.set(i,(a.get(i)||0)+1))(n.getAttribute('val')),a),new Map).entries()].sort(([,a],[,b])=>b-a).join('\n'));
*統計ページをID数でソート & IDあたりの投稿数の追加
[[構文>http://toro.open2ch.net/test/read.cgi/tech/1372630732/92]]
*設定したNGワードに自動で反応してアク禁する(動作未確認・スレ主用)
#image(https://i.imgur.com/Gt24NpS.jpg)
[[外部サイト>http://let.hatelabo.jp/Awn/let/hLHWrMzj08dj]]
動作中の様子:[[自動アク禁のテストをしたいので書き込みしに来てください!>http://hayabusa.open2ch.net/test/read.cgi/news4vip/1483790401/]]
&b(){↑現在動作せず…?}
**代用
> let ngwords = (prompt('NGワード(,区切り)', '').split(','));
> let ngnames = (prompt('NGネーム(,区切り)', '').split(','));
> let nggyou = Number(prompt('行数制限(文字・1以下入れるとバグる)\nInfinityで無効','Infinity'));
> let lastdetectednum = 0;
>
> $(document).ajaxComplete(function() {
> detectNGs();
> });
>
> function detectNGs() {
> let lastnum = $('dl:last').attr('val');
> $.each(ngwords,function(i,elm){
> if($('dl:last>dd').is(':contains('+elm+')')&&lastdetectednum!==lastnum){
> $.ajax({type:'POST',url:'/test/bbs.cgi',data:{MESSAGE:'!aku'+lastnum,bbs:bbs,key:bbskey,submit:'書'}});
> lastdetectednum=lastnum;
> console.log('%c!aku'+ldn,'color:red;font-size:32px;font-weight:bold');
> }
> });
> $.each(ngnames,function(i,elm){
> if($('dl:last>dt>font').is(':contains('+elm+')')&&lastdetectednum!==lastnum){
> $.ajax({type:'POST',url:'/test/bbs.cgi',data:{MESSAGE:'!aku'+lastnum,bbs:bbs,key:bbskey,submit:'書'}});
> lastdetectednum=lastnum;
> console.log('%c!aku'+ldn,'color:red;font-size:32px;font-weight:bold');
> }
> });
> if($('dl:last>dd').text().split('\n').length-1>nggyou&&lastdetectednum!==lastnum){
> $.ajax({type:'POST',url:'/test/bbs.cgi',data:{MESSAGE:'!aku'+lastnum,bbs:bbs,key:bbskey,submit:'書'}});
> lastdetectednum=lastnum;
> console.log('%c!aku'+ldn,'color:red;font-size:32px;font-weight:bold');
> }
> }
>
> console.log(`%cNGワード「${ngwords}」\nNGネーム「${ngnames}」\n行数制限「${nggyou}行」`,"font-size:16px;");
*順位スレのスレタイを自動生成(スレ主用)
[[外部リンク>https://greasyfork.org/ja/scripts/41087-jun-ithreadtitlegenerator]]
[[最新の順位表とクリンチナンバー>https://greasyfork.org/ja/scripts/41087-jun-ithreadtitlegenerator]]にアクセスした際、順位スレのスレタイを自動生成する。
*関連リンク
[[ブックマークレット(プログラム技術)>http://toro.open2ch.net/test/read.cgi/tech/1372630732/]]
おーぷん関連のスクリプトが投稿されている。
*コメント欄
#comment_num2()
----
&link_anchor(メニュー){▽}タグ一覧
&tags()
----