This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
<< COMMENT | |
Copyright (c) 2022 hidao80 | |
Released under the MIT license | |
https://opensource.org/licenses/mit-license.php | |
COMMENT | |
# | |
# Message pre-process | |
# | |
msg=`cat $1 | sed -e '/^#/d'` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (c) 2022 hidao80 | |
* Released under the MIT license | |
* https://opensource.org/licenses/mit-license.php | |
*/ | |
/* | |
README | |
======== | |
url-sticky |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (c) 2022 hidao80 | |
* Released under the MIT license | |
* https://opensource.org/licenses/mit-license.php | |
*/ | |
(function () { | |
const instance = "https://misskey.dev"; | |
const link_text = "選択範囲へ直リンク"; | |
const LF = '\n'; | |
const CR = '\r'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (c) 2022 hidao80 | |
* Released under the MIT license | |
* https://opensource.org/licenses/mit-license.php | |
*/ | |
// bookmarklet: | |
// javascript:(()=>{let msg=e=>{let msg=document.querySelectorAll("._message");return msg[msg.length-1]},lastMsg=e=>msg().getElementsByTagName("pre")[0].textContent,lastMsgId=e=>msg().dataset.mid,speakerName=e=>{let name=document.querySelectorAll("._speakerName");return name[name.length-1].textContent},old_id=lastMsgId();const synth=new SpeechSynthesisUtterance;speechSynthesis.onvoiceschanged=()=>{const voices=speechSynthesis.getVoices();if(navigator.userAgent.toLowerCase().indexOf("edg")>-1)for(let i=0;i<voices.length;i++)voices[i].name.indexOf("Nanami")>-1&&(synth.voice=voices[i])},setInterval(()=>{let new_id=lastMsgId();old_id!=new_id&&(old_id=new_id,speechSynthesis.cancel(),synth.text=speakerName()+"さんの投稿。"+lastMsg().replace(/https?:\/\/[\w/:%#\$&\?\(\)~\.=\+\-]+/g," "),speechSynthesis.speak(synth))},1e3)})(); | |
(() => { | |
let msg = e => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Debugging screen for tablets | |
* | |
* Usage: | |
* import debug from "./debugTablet.js"; | |
* It is also useful to control on/off with the url parameter. | |
* const DEUBG = new URL(window.location.href).searchParams.get('DEBUG') ? true : false; // Setting the debug flag | |
* debug.init(DEUBG); // Debugging screen enabled | |
* debug.alignRight(true); // Right-aligned (left-aligned by default) | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(()=>{ | |
let old_id = document.getElementsByClassName("item-list")[2].firstElementChild.dataset.id; | |
const timer = setInterval(() => { | |
let new_id = document.getElementsByClassName("item-list")[2].firstElementChild.dataset.id; | |
if (old_id !== new_id) { | |
old_id = new_id; | |
const parentElm = [...document.querySelectorAll('.column-header')].find(v => /ローカルタイムライン/.test(v.textContent)).parentElement.parentElement; | |
new Notification(parentElm.querySelector(".display-name__html").textContent, { body: parentElm.querySelector('.status__content')?.textContent ?? '', icon: parentElm.querySelector('.account__avatar, account__avatar-overlay-base')?.style?.backgroundImage?.replace(/^url\("|"\)/g, '') ?? ''}); | |
} | |
},1000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//HTTP GETをハンドリングする | |
function doGet(e) { | |
//リクエストパラメータ名"q"の値を取得する | |
//あらかじめURLエンコードしたものを受け取ること! | |
const text = e.parameter.q; | |
console.log(text); | |
console.log(encodeURIComponent(text)); | |
const payload = "url=" + encodeURIComponent(text); | |
const options = { | |
"method" : "post", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# esa.io の 記事投稿 API を使って、ローカルの Markdown ファイルを投稿する | |
# 投稿に成功したファイルは $sent_file_dir に退避させ、重複登録を防ぐ | |
# コール制限は 75 回/15分 なので、target_dirに 75ファイル以上入れても 76ファイル目以降で | |
# 自動で止まる。続きは手動で再実行すること | |
# | |
target_dir=default | |
sent_file_dir=default/sent | |
api_token=<your-writable-api-token> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/.gitignore b/.gitignore | |
index 73aa11e..11b3587 100644 | |
--- a/.gitignore | |
+++ b/.gitignore | |
@@ -2,6 +2,7 @@ build/*/ | |
build/*.zip | |
build/*.exe | |
build/*.tgz | |
+build/*.bak | |
b9/lib/js/node_modules/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* リアクションtootスクリプト | |
* | |
* メンションを発見したら直ちにリプライ | |
* | |
* アクセストークンとインスタンスのAPI URLはプロジェクトのプロパティに設定しておく。 | |
* ソースコードとトークンおよびインスタンスを切り離すことにより、スクリプトの再利用性が高まった。 | |
* | |
* リアクションtootスクリプト © @hidao80 クリエイティブ・コモンズ・ライセンス(表示4.0 国際)https://creativecommons.org/licenses/by/4.0/ | |
*/ |