Skip to content

Instantly share code, notes, and snippets.

@hyuki
Created March 28, 2020 11:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyuki/e5c873acb779e05b0bd1973336570087 to your computer and use it in GitHub Desktop.
Save hyuki/e5c873acb779e05b0bd1973336570087 to your computer and use it in GitHub Desktop.
edit-radio-source.js - https://radio.hyuki.net/20180508235800/ のようなページにアクセスしているとき、 * "vi ~/Documents/doc/math.hyuki.net/txt/20180508235800.txt"というコマンド文字列を表示してくれる。
/*
* edit-radio-source.js
* https://radio.hyuki.net/20180508235800/ のようなページにアクセスしているとき、
* "vi ~/Documents/doc/math.hyuki.net/txt/20180508235800.txt"というコマンド文字列を表示してくれる。
*/
function start() {
if (location.href.match(/radio.hyuki.net\/(\d+)/)) {
prompt('Edit Me!', 'vi ~/Documents/doc/radio.hyuki.net/txt/' + RegExp.$1 + '.txt');
} else {
alert("radio.hyuki.net/YYYYMMDDhhmmss is not found.");
}
}
start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment