ユーザーコマンド

Last-modified: 2024-04-11 (木) 17:22:31

ユーザーが自分でSikiに好きなコマンドを追加できる「ユーザーコマンド」の使い方と設定サンプル集。

基本的な使い方は公式サイトの「ユーザーコマンド」を参照。
ユーザーコマンドの追加ではなく、既にある右クリックメニューを変更したい場合はこちらを参照


usercommand.jsのサンプルの利用

とても便利な設定サンプルが公式サイトで配布されているので、これを出発点とするのがおすすめ。インストール方法はこちらを参照

このサンプルは時々アップデートされているので、たまにダウンロードして差し替えると良い。この場合、差し替え前のものもコピーして残しておこう。
自分で編集した部分はファイル末尾にまとめておくなどして、差し替えの際に新しいファイルにコピペするとスムーズに移行できる。

サンプルを追加するだけでもメニューに項目が相当数追加されるが、attach(表示するメニュー)の設定がないユーザーコマンド例も多数含まれており、編集して

"attach": "url",

などを追加することでメニューに表示されるようになる
63YcSeD.png
項目の意味などは以下の解説を参照。

usercommand.jsの基本的な編集方法

書き換えてコマンド、メニュー表示を編集可能。

ff5ch.search.asboard等項目のコマンド名。(他と被らないようにする)
label右クリック内の表示名を指定、ラベルに(&○)で実行キー指定可能
type変更しない(現在emit一択)
icon_setアイコンを指定。Font Awesomeのもの?
condメニューの出現条件。例1:"sitename=reddit.com"でRedditを開いている時だけ出現。例2:"url"でurlが指定されている時だけ出現
attachどの右クリックに表示するかを指定(attach項そのものを消せばメニュー非表示のコマンドになる)
resはレス、selectedは選択文字列、idはID、imageは画像、urlはリンク、tab.threadはスレタブ、tab.boardは板タブに表示
command実行コマンドを指定
params実行コマンドの対象を指定
'${OBJECT.location}'はアクティブなタブやスレ、板のURLを送るパラメータ(→詳細)。
右クリックされた対象にURLがあれば渡せる

usercommandを編集して新項目を作成した場合、ショートカットキー・マウスジェスチャパネルアクション・スーパードラッグでコマンド指定可能になる。
※選択範囲系のコマンドはショートカットキー、パネルアクションに入れても対象を認識できず使えない。マウスに割り当てる場合はマウスジェスチャでなくスーパードラッグに割り当てる

このページにある例などを新規に追加する場合には、画像の要領で他のコマンドに並ぶよう挿入する。カンマ抜けに注意。ファイル最後の閉括弧「}」の前が良いだろう。
siki-add-user-command.png

編集時の注意

反映には再起動が必要。Siki起動時に、usercommand.js(に限らず設定ファイル全般)が「破損」していると、そのファイルは破棄されデフォルトのもので上書きされてしまう。
括弧の対応ミスなどのような些細なシンタックスエラーでも簡単に消えてしまうので、編集した後は必ずバックアップを残しておこう。

OBJECTの主なプロパティ

https://egg.5ch.net/test/read.cgi/software/1675213433/925-960

960: RomTenma sage 2023/03/30(木) 22:08:46.20 ID:9nEas6zh0
>>934
スレッドとレスのオブジェクトを混ぜたものが入っているのでそこから引っ張って来れます
使えそうなのはこの辺ですかね
 
body レス本文
mail レスのメール欄
mname レスの名前欄
nickname レスのニックネーム
id レスのID
id2 レスのSLIP
num レスの番号
an レスの最初を0として数えた順番(最初のレス番号が1なら レス番号- 1)
title スレッドのタイトル
location スレッドのurl
server スレッドのサーバー
board スレッドの板
threadkey スレッドのキー
chars レス本文の文字数
timestamp レスの投稿日時(ミリ秒)

たとえば${OBJECT.threadkey}でスレッドのキー(番号)を呼び出せる。

 

特定掲示板サイトのスレタイ検索を追加する方法

※5chのスレタイ検索は0.28.0以降は標準で搭載されるようになっている。ただし、アドレスバーから検索したい場合などには以下の方法で改めてff5chなどを登録することで他の検索サイトと同様に扱えるようになる。

Reddit検索を右クリックメニューに追加してみよう

redditを例に解説する。

登録したいサイトをブラウザで開き、実際に何か(英数文字推奨)検索してみる。ここでは「test」で検索した。
検索結果のURLを観察し、検索した文字列が含まれていれば対応可能。

https://www.reddit.com/search/?q=test

検索文字列の部分を「${TEXT:urlencode}」に置き換えたものをパラメータとして指定する。

// 文字列を選択して検索するコマンド
"reddit.search": { // コマンド名をつける
  "label": "redditで検索(&E)", // メニューに表示されるラベルと、ショートカットキー(E)
  "type": "emit",
  "attach": [
    "selected",
  ],
  "command": "uri:open-browserview", // 'uri:request' で板として開けるが一部サイトでしか動作しない
  "params": [
    // ここに先述のURLの文字列を書く
    "https://www.reddit.com/search/?q=${TEXT:urlencode}",
  ],
},
// 文字列を打ち込んで検索するコマンド
"reddit.search.prompt": { // こちらにもコマンド名をつける
  "label": "redditで検索",  // ラベルもつける
  "type": "emit",
  "attach": [
    "res",
  ],
  "command": "ui:prompt",
  "params": [
    // ここには「user:」のあとに上で作った文字列選択コマンドの名前を入れる
    "user:reddit.search",
  ],
},

以上のものをusercommand.jsに「他のコマンドと並ぶよう」追記してSikiを再起動すれば右クリックメニューに追加されている。(「基本的な編集方法」参照)

検索結果のURLに検索キーワードが含まれていない場合は、現段階ではSikiからキーワードを渡すのは難しいので、単に検索画面を呼び出すだけのコマンドを作ると良い。

良く使うコマンドはパネルアクションなどに追加するとさらに便利。自分でつけたコマンド名を指定できる。
「文字列を選択して検索するコマンド」は3つまでアドレスバーにも登録できる

Siki対応掲示板のスレタイ検索用params

いくつかparamsの例を紹介するので、使いたいものを先述の例と差し替えて追加してみてほしい。(→差し替え例
なお、たまに使うだけならURLをアドレスバーに直打ちして「URLをブラウザビューで開く」を選択すれば開ける。
0.28.0以降で標準搭載されるようになった「スレッド検索」ボタンで使用したい場合は、${TEXT:urlencode}の代わりに<text>で置き換える。

5ch.net (ff5ch)
"https://ff5ch.syoboi.jp/?q=${TEXT:urlencode}"
Reddit
"https://www.reddit.com/search/?q=${TEXT:urlencode}",
Reddit(日本語版のみ)
"https://www.reddit.com/r/ja/search/?q=${TEXT:urlencode}",
Talk
"https://talk.jp/search/thread?query=${TEXT:urlencode}",
したらば
"https://rentalbbs.shitaraba.com/jbbs/search/?word=${TEXT:urlencode}",
open2ch
"https://find.open2ch.net/?q=${TEXT:urlencode}",
ガールズちゃんねる
"https://girlschannel.net/topics/search/?q=${TEXT:urlencode}",
爆サイ
クリックして詳細をオープン
爆サイ(北海道版)
"https://bakusai.com/sch_thr_thread/acode=1/word=${TEXT:urlencode}",
爆サイ(北東北版)
"https://bakusai.com/sch_thr_thread/acode=14/word=${TEXT:urlencode}",
爆サイ(南東北版版)
"https://bakusai.com/sch_thr_thread/acode=2/word=${TEXT:urlencode}",
爆サイ(北関東版)
"https://bakusai.com/sch_thr_thread/acode=15/word=${TEXT:urlencode}",
爆サイ(南関東版)
"https://bakusai.com/sch_thr_thread/acode=3/word=${TEXT:urlencode}",
爆サイ(甲信越版)
"https://bakusai.com/sch_thr_thread/acode=4/word=${TEXT:urlencode}",
爆サイ(北陸版)
"https://bakusai.com/sch_thr_thread/acode=6/word=${TEXT:urlencode}",
爆サイ(東海版)
"https://bakusai.com/sch_thr_thread/acode=5/word=${TEXT:urlencode}",
爆サイ(関西版)
"https://bakusai.com/sch_thr_thread/acode=7/word=${TEXT:urlencode}",
爆サイ(山陽版)
"https://bakusai.com/sch_thr_thread/acode=8/word=${TEXT:urlencode}",
爆サイ(山陰版)
"https://bakusai.com/sch_thr_thread/acode=12/word=${TEXT:urlencode}",
爆サイ(四国版)
"https://bakusai.com/sch_thr_thread/acode=9/word=${TEXT:urlencode}",
爆サイ(北部九州版)
"https://bakusai.com/sch_thr_thread/acode=10/word=${TEXT:urlencode}",
爆サイ(南部九州版)
"https://bakusai.com/sch_thr_thread/acode=16/word=${TEXT:urlencode}",
爆サイ(沖縄版)
"https://bakusai.com/sch_thr_thread/acode=11/word=${TEXT:urlencode}",
爆サイ 本文検索
クリックして詳細をオープン
爆サイ(北海道版)本文検索
"https://bakusai.com/sch_thr_res/acode=1/word=${TEXT:urlencode}",
爆サイ(北東北版)本文検索
"https://bakusai.com/sch_thr_res/acode=14/word=${TEXT:urlencode}",
爆サイ(南東北版版)本文検索
"https://bakusai.com/sch_thr_res/acode=2/word=${TEXT:urlencode}",
爆サイ(北関東版)本文検索
"https://bakusai.com/sch_thr_res/acode=15/word=${TEXT:urlencode}",
爆サイ(南関東版)本文検索
"https://bakusai.com/sch_thr_res/acode=3/word=${TEXT:urlencode}",
爆サイ(甲信越版)本文検索
"https://bakusai.com/sch_thr_res/acode=4/word=${TEXT:urlencode}",
爆サイ(北陸版)本文検索
"https://bakusai.com/sch_thr_res/acode=6/word=${TEXT:urlencode}",
爆サイ(東海版)本文検索
"https://bakusai.com/sch_thr_res/acode=5/word=${TEXT:urlencode}",
爆サイ(関西版)本文検索
"https://bakusai.com/sch_thr_res/acode=7/word=${TEXT:urlencode}",
爆サイ(山陽版)本文検索
"https://bakusai.com/sch_thr_res/acode=8/word=${TEXT:urlencode}",
爆サイ(山陰版)本文検索
"https://bakusai.com/sch_thr_res/acode=12/word=${TEXT:urlencode}",
爆サイ(四国版)本文検索
"https://bakusai.com/sch_thr_res/acode=9/word=${TEXT:urlencode}",
爆サイ(北部九州版)本文検索
"https://bakusai.com/sch_thr_res/acode=10/word=${TEXT:urlencode}",
爆サイ(南部九州版)本文検索
"https://bakusai.com/sch_thr_res/acode=16/word=${TEXT:urlencode}",
爆サイ(沖縄版)本文検索
"https://bakusai.com/sch_thr_res/acode=11/word=${TEXT:urlencode}",
スラド
"https://srad.jp/index2.pl?fhfilter=${TEXT:urlencode}",
あにまん掲示板
"https://bbs.animanch.com/search/${TEXT:urlencode}",
おっちゃんねる
"https://occhan-nel.com/thread/search?word=${TEXT:urlencode}",
雑談たぬき
"https://b.2ch2.net/test/search.cgi?bbs=zatsudan&w=${TEXT:urlencode}"
(本文検索)
"https://b.2ch2.net/test/search.cgi?t=b&bbs=zatsudan&guid=on&w=${TEXT:urlencode}",
ニコニコ大百科
"https://dic.nicovideo.jp/s/al/t/${TEXT:urlencode}",

選択右クリックと右クリックにTalk検索を追加

先述のredditの例をtalkのURLに変えただけ。どこの検索でも同様に対応可能。

"talk.search": {
  "label": "Talkで検索(&T)",
  "type": "emit",
  "attach": [
    "selected",
  ],
  "command": "uri:open-browserview",
  "params": [
    "https://talk.jp/search/thread?query=${TEXT:urlencode}",
  ],
},
"talk.search.prompt": {
  "label": "Talkで検索",
  "type": "emit",
  "attach": [
    "res",
  ],
  "command": "ui:prompt",
  "params": [
    "user:talk.search",
  ],
},

公式サンプルのff5ch.search.asboard(検索結果を板へ表示)とff5ch.search.asboard.prompt(検索結果を板として表示)を右クリックで使用

公式サンプルの両コマンドはff5ch検索結果を直接板に開ける。(旧ff5chで板として開く)
ff5ch.search.asboardのtypeとcommandの間に以下追記で選択右クリックに表示。

"attach": [
  "selected",
],

ff5ch.search.asboard.promptはattach resを追記で右クリックに表示。
※prompt利用には元となるコマンドが必要。

その他の各種掲示板検索を追加

選択右クリックに「ワードを2ch全文検索(ブラウザビュー)」を追加

"search2ch.info": {
  "label": "2ch全文検索",
  "type": "emit",
  "attach": [
    "selected",
  ],
  "command": "uri:open-browserview",
  "params": [
    "https://search2ch.info/#gsc.tab=0&gsc.q=${TEXT:urlencode}",
  ],
},

右クリックに5ch全文検索(ブラウザビュー)を追加

"5ch.search2ch.info": {
  "label": "5ch全文検索",
  "type": "emit",
  "attach": [
    "res",
  ],
  "command": "uri:open-browserview",
  "params": [
    "https://5ch.search2ch.info/",
  ],
},

選択右クリックにワードを掲示板横断検索(ブラウザビュー)を追加

※左上や下部のサービス(2ch、おーぷん、ふたばさーち)では検索してもSikiに開けないので注意。
※検索サイトから対応サイト指定は有効。

"zzzsearch.search": {
  "label": "掲示板横断検索",
  "type": "emit",
  "attach": [
    "selected",
  ],
  "command": "uri:open-browserview",
  "params": [
    "https://zzzsearch.com/bbs/#gsc.q=${TEXT:urlencode}",
  ],
},

右クリックに掲示板横断検索TOP(ブラウザビュー)を追加

※左上や下部のサービス(2ch、おーぷん、ふたばさーち)では検索してもSikiに開けないので注意。
※検索サイトから対応サイト指定は有効。

"zzzsearch.search.browser": {
  "label": "掲示板横断検索TOP",
  "type": "emit",
  "attach": [
    "res",
  ],
  "command": "uri:open-browserview",
  "params": [
    "https://zzzsearch.com/bbs",
  ],
},

選択右クリックにワードをかころぐβ検索(ブラウザビュー)を追加

"kakolog.search.bv": {
  "label": "かころぐβ",
  "type": "emit",
  "attach": [
    "selected",
  ],
  "command": "uri:open-browserview",
  "params": [
    "https://kakolog.jp/q/${TEXT:urlencode}",
  ],
},

右クリックにかころぐβ検索TOP(ブラウザビュー)を追加

"kakolog.search.top": {
  "label": "かころぐβTOP",
  "type": "emit",
  "attach": [
    "res",
  ],
  "command": "uri:open-browserview",
  "params": [
    "https://kakolog.jp/",
  ],
},

選択右クリックにワードをかころぐβ検索(板表示)を追加

かころぐβ表示用プラグインの導入が前提。
※サイト側が度々仕様変更をするため機能しなくなる場合がある。プラグイン側もひっそりと更新されてたりする。エラーが出続けるときはブラウザビュー版の検討を。

"kakolog.search": {
  "label": "かころぐβ検索",
  "type": "emit",
  "attach": [
    "selected",
  ],
  "command": "uri:request",
  "params": [
    "https://kakolog.jp/q/${TEXT:urlencode}",
  ],
},

右クリックにワードをかころぐβ検索入力欄を表示

※利用には選択右クリックとセットで追記。

"kakolog.search.prompt": {
  "label": "かころぐβ検索",
  "type": "emit",
  "attach": "res",
  "command": "ui:prompt",
  "params": [
    "user:kakolog.search",
  ],
},

右クリックにエッヂの過去ログTOP(ブラウザビュー)を追加

サイト内

ブラウザでは見れません。
スレタイをタッチするとそのスレのURLをコピーできます。
そのURLを専ブラで開いてください。

とあるが、Sikiのブラウザビュー機能からならスレタイをクリックするだけでそのまま開くことができる。

"eddiarchive.search.top": {
  "label": "エッヂの過去ログTOP",
  "type": "emit",
  "attach": "res",
  "command": "uri:open-browserview",
  "params": [
    "https://eddiarchive.com/",
  ],
},

BBSPINKの右クリックに必死チェカーもどきを追加

※5ch用は公式サンプルにあり。

"hissi.checkid.pink": {
  "label": "必死チェッカー",
  "type": "emit",
  "cond": "sitename=bbspink.com",
  "attach": [
    "res",
    "id",
  ],
  "command": "uri:open-browserview",
  "params": [
    "http://hissi.org/read.php/${OBJECT.board}/${OBJECT.timestamp:timeformat.YYYYMMDD}/${OBJECT.id_verbose:base64}.html",
  ],
},

エッヂの右クリックに必死チェカーを追加

"hissi.checkid.eddibb": {
  "label": "必死チェッカー",
  "type": "emit",
  "cond": "sitename=eddibb.cc",
  "attach": "id",
  "command": "uri:open-browserview",
  "params": [
    "https://www.kyodemo.net/sdemo/b/e_e_${OBJECT.board}/?hi=${OBJECT.id}&key=${OBJECT.threadkey}&date=${OBJECT.timestamp:timeformat.YYYYMMDD}",
  ],
},
 

掲示板検索以外の機能を追加

5ちゃんねるの右クリックに5ちゃんねる鯖監視所(氷)を追加

サーバー側の状態の確認が可能。
読み込みの調子が突然悪くなったなどの症状が発生したときに確認すると良いかも。

"check.5ch.serversstate": {
  "label": "5ちゃんねる鯖監視所(氷)",
  "type": "emit",
  "cond": "sitename=5ch.net",
  "attach": "res",
  "command": "uri:open-browserview",
  "params": [
    "https://ss1.xrea.com/z4s85ttt.s1007.xrea.com/5chkanshi/disp_status.php",
  ],
},

BBSPINKの右クリックにBBSPINK鯖監視所(柿)を追加

"check.bbspink.serversstate": {
  "label": "BBSPINK鯖監視所(柿)",
  "type": "emit",
  "cond": "sitename=bbspink.com",
  "attach": "res",
  "command": "uri:open-browserview",
  "params": [
    "https://ss1.xrea.com/z4s85ttt.s1007.xrea.com/bbspink_kanshi/disp_status.php",
  ],
},

したらば掲示板の右クリックにしたらば鯖監視所(梅)を追加

"check.sitaraba.serversstate": {
  "label": "したらば鯖監視所(梅)",
  "type": "emit",
  "cond": "sitename=shitaraba.net",
  "attach": "res",
  "command": "uri:open-browserview",
  "params": [
    "https://ss1.xrea.com/z4s85ttt.s1007.xrea.com/shitaraba_kanshi/disp_status.php",
  ],
},

BBS.JPNKN.COMの右クリックにBBS.JPNKN.COM System Statusを追加

Siki公式掲示板が利用しているBBS.JPNKN.COMのサーバー側の状態の確認が可能。

"check.bbsjpnkncom.serversstate": {
  "label": "*BBS.JPNKN.COM System Status",
  "type": "emit",
  "cond": "sitename=jpnkn.com",
  "attach": "res",
  "command": "uri:open-browserview",
  "params": [
    "https://jo.jpnkn.com/",
  ],
},

画像URLの右クリックにGoogleレンズ検索(ブラウザビュー)を追加

"google.lenssearch": {
  "label": "Googleレンズで検索",
  "type": "emit",
  "cond": "url",
  "attach": "image",
  "command": "uri:open-browserview",
  "params": [
    "https://lens.google.com/uploadbyurl?url=${OBJECT.url:urlencode}",
  ],
},

画像URLの右クリックにSauceNAO検索(ブラウザビュー)を追加

"saucenao.search": {
  "label": "SauceNAOで検索",
  "type": "emit",
  "cond": "url",
  "attach": "image",
  "command": "uri:open-browserview",
  "params": [
    "https://saucenao.com/search.php?url=${OBJECT.url:urlencode}",
  ],
},

選択右クリックにワードをGoogle画像検索(外部ブラウザ)を追加

公式サンプルのGoogle画像検索(&G)は対象画像をGoogle検索にかけるコマンド。

"google.search.browser.image": {
  "label": "Googleで画像検索",
  "type": "emit",
  "attach": "selected",
  "command": "uri:open-external",
  "params": [
    "https://www.google.co.jp/search?q=${TEXT:urlencode}&tbm=isch",
  ],
},

選択右クリックにワードをGoogle翻訳(ブラウザビュー)を追加

※現在は右クリックメニューにデフォルトで翻訳がある
選択文中に/を含んでも全文入力される。

"google.translation": {
  "label": "Google翻訳",
  "type": "emit",
  "attach": [
    "selected",
  ],
  "command": "uri:open-browserview",
  "params": [
    "https://translate.google.co.jp/?hl=ja&tab=TT&sl=auto&tl=ja&text=${TEXT:urlencode}&op=translate",
  ],
},

選択右クリックにワードをDeepl翻訳(ブラウザビュー)を追加

選択文中に/を含んでいるとそこまでしか翻訳欄に入力されない。
この場合は先に範囲をコピー、ブラウザビューを開いて欄にCtrl + vで貼り付ける。

"deepl.translation": {
  "label": "Deepl翻訳",
  "type": "emit",
  "attach": [
    "selected",
  ],
  "command": "uri:open-browserview",
  "params": [
    "https://www.deepl.com/translator#en/ja/${TEXT:urlencode}",
  ],
},

選択右クリックに「Amazon補完」を追加

ASIN(B0で始まるAmazonの商品コード)を選択して実行すると商品ページを外部ブラウザで開く。

"amazon.search.word": {
  "label": "Amazon補完",
  "type": "emit",
  "attach": [
    "selected",
  ],
  "command": "uri:open-external",
  "params": [
    "https://amazon.co.jp/dp/${TEXT:urlencode}",
  ],
},

ReplaceStr.txtを使って自動リンクする別解あり。

選択右クリックにワードをTwitter検索(外部ブラウザ)を追加

※2023年4月下旬以降ログインなしでの検索ができなくなっている模様 。(2023年5月6日追記)

"twitter.search.word": {
  "label": "選択箇所をTwitterで検索",
  "type": "emit",
  "attach": "selected",
  "command": "uri:open-external",
  "params": [
    "https://twitter.com/search?q=${TEXT:urlencode}",
  ],
},

選択右クリックにワードをWikipedia検索(ブラウザビュー)を追加

"wikipedia.search.word": {
  "label": "選択箇所をWikipediaで検索",
  "type": "emit",
  "attach": "selected",
  "command": "uri:open-browserview",
  "params": [
    "https://jp.wikipedia.org/wiki/Special:Search?search=${TEXT:urlencode}",
  ],
},

選択右クリックにワードをWeblio辞書検索(ブラウザビュー)を追加

"weblio.search.word": {
  "label": "選択箇所をWeblio辞書で検索",
  "type": "emit",
  "attach": "selected",
  "command": "uri:open-browserview",
  "params": [
    "https://www.weblio.jp/content/${TEXT:urlencode}",
  ],
},

選択右クリックにワードをニコニコ大百科検索(ブラウザビュー)を追加

"nicopedia.search.word": {
  "label": "選択箇所をニコニコ大百科で検索",
  "type": "emit",
  "attach": "selected",
  "command": "uri:open-browserview",
  "params": [
    "https://dic.nicovideo.jp/s/a/t/${TEXT:urlencode}",
  ],
},

選択右クリックにワードをピクシブ百科事典検索(ブラウザビュー)を追加

"pixiv.search.word": {
  "label": "選択箇所をピクシブ百科事典で検索",
  "type": "emit",
  "attach": "selected",
  "command": "uri:open-browserview",
  "params": [
    "https://dic.pixiv.net/search?query=${TEXT:urlencode}",
  ],
},

右クリックしたURLをWebArchiveで開く(外部ブラウザ)を追加

"webarchive": {
  "label": "Web Archiveで開く",
  "type": "emit",
  "attach": "url",
  "command": "uri:open-external",
  "params": [
    "https://web.archive.org/web/${TEXT}"
  ],
},

右クリックしたURLをaguse.で検索(外部ブラウザ)を追加

"check.url.aguse": {
  "label": "aguse.でURLの安全性を検証",
  "type": "emit",
  "attach": "url",
  "command": "uri:open-external",
  "params": [
    "https://www.aguse.jp/?m=w&url=${TEXT}",
  ],
},
 

デフォルトの検索エンジン設定を使った検索を追加する方法

※「設定 > ネットワーク > デフォルトの検索エンジン設定」で検索エンジンの変更が可能。

右クリックに「ワードを外部ブラウザ検索」を追加

"externalbrowser.search": {
  "label": "【外部ブラウザ検索】",
  "type": "emit",
  "command": "uri:open-external.search",
  "params": [
    "${TEXT}",
  ],
},
"externalbrowser.search.prompt": {
  "label": "外部ブラウザで検索",
  "type": "emit",
  "attach": "res",
  "command": "ui:prompt",
  "params": [
    "user:externalbrowser.search",
  ],
},

選択右クリックに「ワードを外部ブラウザ検索」を追加

"externalbrowser.search.word": {
  "label": "選択箇所を外部ブラウザで検索",
  "type": "emit",
  "attach": "selected",
  "command": "uri:open-external.search",
  "params": [
    "${TEXT}",
  ],
},

右クリックに「ワードをブラウザビュー検索」を追加

"browserview.search": {
  "label": "【ブラウザビュー検索】",
  "type": "emit",
  "command": "uri:open-browserview.search",
  "params": [
    "${TEXT}",
  ],
},
"browserview.search.prompt": {
  "label": "ブラウザビューで検索",
  "type": "emit",
  "attach": "res",
  "command": "ui:prompt",
  "params": [
    "user:browserview.search",
  ],
},

選択右クリックにワードをブラウザビュー検索を追加

"browserview.search.word": {
  "label": "選択箇所をブラウザビューで検索",
  "type": "emit",
  "attach": "selected",
  "command": "uri:open-browserview.search",
  "params": [
    "${TEXT}",
  ],
},
 

Siki内蔵のコマンドをユーザーコマンドとして割り当てる

板タブ右クリックにタブをまとめて閉じる系コマンドを追加

公式サンプルを導入し、「他のタブをすべて閉じる」「以降のタブをすべて閉じる」など使用したいコマンドをコピーして以下のように作り変える。

  "tab.close.thread.right": {
    "label": "以降のタブをすべて閉じる",
    "type": "emit",
    "attach": [
      "tab.thread"
    ],
    "command": "tab:close.right",
    "params": [
      "${OBJECT.tabid}",
      "thread"
    ]
  },

 ↓↓↓

  "tab.close.board.right": { // 別のコマンド名をつける
    "label": "以降の板タブをすべて閉じる",
    "type": "emit",
    "attach": [
      "tab.board" // threadから変える
    ],
    "command": "tab:close.right",
    "params": [
      "${OBJECT.tabid}",
      "board" // threadから変える
    ]
  },

1つのコマンドで板とスレ両方をカバーすることもできなくはないが、タブ上でなくコマンドパレットなど文脈が不明確な状況で呼ばれた時に想定外のタブを閉じてしまうおそれがあるので別のコマンドを用意した方が安全

スレタブ右クリックに「全てのタブをお気に入り」を追加

"tab.fav.alltabs": {
  "label": "全てのタブをお気に入り",
  "type": "emit",
  "attach": [
    "tab.thread",
  ],
  "command": "favorites:add.alltabs",
  "params": [
    "${OBJECT.tabid}",
    "thread",
  ],
},

右クリックに報告形式(レスURL 日時 ID)コピーを追加

日時を24時間表示に変更済み。

"report": {
  "label": "報告形式でコピー",
  "type": "emit",
  "attach": [
    "res",
  ],
  "command": "clipboard:copy",
  "params": [
    "${OBJECT.location}${OBJECT.num} ${OBJECT.timestamp:timeformat.YYYY/MM/DD(dd) HH:mm:ss.SS} ID:${OBJECT.id}",
  ],
},

右クリックにフィルター入力欄表示を追加

公式サンプルのフィルターとセット(今はフィルター入力で欄にフォーカスするのであまり必要ない)

"filter.word.prompt": {
  "label": "フィルター",
  "type": "emit",
  "attach": [
    "res",
  ],
  "command": "ui:prompt",
  "params": [
    "user:filter.word",
  ],
},

右クリックしたURLをミュートするコマンドを追加

"mute.word.url": {
  "label": "URLをミュート",
  "type": "emit",
  "attach": "url",
  "command": "thread:cursor.mute.word",
  "params": [
    null,
    "${TEXT}",
  ],
},

画像URL/サムネイル右クリックにそのURLをミュートするコマンドを追加

※画像ビューア内の右クリックメニューからの使用はできないため注意。

"mute.image.url": {
  "label": "画像URLをミュート",
  "type": "emit",
  "cond": "url",
  "attach": "image",
  "command": "thread:cursor.mute.word",
  "params": [
    null,
    "${OBJECT.url}",
  ],
},

スレタイ+URLコピー(スレのキーボードショートカット用)

"thread:title_url.copy": {
  "label": "スレッドのタイトル+URLコピー",
  "type": "emit",
  "command": "clipboard:copy",
  "params": [
    "${OBJECT.title}\r\n${OBJECT.location}",
  ],
},

※標準装備の「スレッドのタイトル+URLコピー」(board:copy.title_url)はボード用のためスレッドでは機能しない。
※残念ながらどちらもジェスチャーからは機能しない。
※0.15.11 にて、ボード用コマンドがスレッドにフォーカスがある時そのスレッドに対してコピーするよう対応された。(ジェスチャーからでも機能する模様)

スレ・スレタブ右クリックでスレを外部ブラウザで10レスだけ表示

"tab.open.l10": {
  "label": "外部ブラウザで最新10レスを開く",
  "type": "emit",
  "attach": [ "tab.thread", "res" ],
  "command": "uri:open-external",
  "params": [
    "${OBJECT.location}l10",
  ],
},

※2ch互換掲示板以外でも呼び出せてしまい誤動作するため注意。

スレ上に貼られたURLの右クリックにも追加

// スレ上のURL(/で終わる2ch互換URLでないと誤動作する)
"open.l10": {
  "label": "外部ブラウザで最新10レスを開く",
  "type": "emit",
  "attach": "url",
  "command": "uri:open-external",
  "params": [
    "${TEXT}l10",
  ],
},

ID右クリックで「ID:」をつけずにコピーする

"id.copy2": {
  "label": "IDを「ID:」部分なしでコピー",
  "type": "emit",
  "attach": "id",
  "command": "clipboard:copy",
  "params": [
    "${OBJECT.id}",
  ],
},

設定画面を直接開く

https://egg.5ch.net/test/read.cgi/software/1692834209/940

NG/強調を例にして任意の設定画面を直接開く方法。attachは設定していないので、自分で設定するかパネルアクションなどに追加して利用する。

"open_ng_setting": {
  "label": "NG/強調設定を開く",
  "type": "emit",
  "command": "core:window.open.setting",
  "params": [
    "resstate"
  ]
},

項目を直接開くために利用できるparamsは以下の通り。

common:"システム"
layout:"レイアウト"
network:"ネットワーク"
mouse:"マウス"
keyboard:"キーボード"
gamepad:"ゲームパッド"
tab:"タブ"
board:"板"
thread:"スレッド"
post:"書き込み"
bbsmenu:"BBSMenu"
message:"メッセージ"
notify:"通知"
image:"画像"
translate:"翻訳"
resstate:"NG/強調"
siteedit:"サイト編集"
edittheme:"テーマ編集"
workspace:"ワークスペース"
plugins:"プラグイン"