マストドン横断検索 (自分用)
by
pacochi
2017-05-07 [2017/05/07 23:24:16]
自分用です。
@@ -2,6 +2,7 @@
* @title マストドン横断検索 (グローバル汚染回避版)
* @description 自分用です。
* @include *
+ * @license MIT License
* @javascript_url
*/
@@ -11,8 +12,13 @@
元のスクリプトが書かれてあるサイト :
http://mastodonsearch.jp/
+
+縮めたもの :
+(k=>{k&&open('http://mastodonsearch.jp/cross/?distinct=1&q='+encodeURIComponent(k))})((''+getSelection())||prompt('検索ワード',''));
*/
-(k =>
+(k => {
k && open('http://mastodonsearch.jp/cross/?distinct=1&q=' + encodeURIComponent(k))
-)(('' + getSelection()) || prompt('検索ワード', ''));
+})(
+ ('' + getSelection()) || prompt('検索ワード', '')
+);
/*
* @title マストドン横断検索 (グローバル汚染回避版)
* @description 自分用です。
* @include *
* @license MIT License
* @javascript_url
*/
/*
元のスクリプト (PublicDomain https://mstdn.jp/users/mastodonsearch/updates/951700) :
var txt=window.getSelection().toString();var key=window.prompt("横断検索したい言葉を入力",txt);if(key!=null){window.open("http://mastodonsearch.jp/cross/?q="+encodeURIComponent(key)+"&distinct=1")};
元のスクリプトが書かれてあるサイト :
http://mastodonsearch.jp/
縮めたもの :
(k=>{k&&open('http://mastodonsearch.jp/cross/?distinct=1&q='+encodeURIComponent(k))})((''+getSelection())||prompt('検索ワード',''));
*/
(k => {
k && open('http://mastodonsearch.jp/cross/?distinct=1&q=' + encodeURIComponent(k))
})(
('' + getSelection()) || prompt('検索ワード', '')
);
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。