google calendarのpermalink作成
by
den8
04/17 [2025/04/17 11:46:05]
googleカレンダーの予定編集画面からpermalinkを作ります
@@ -4,6 +4,8 @@
* @include https://calendar.google.com/
* @license 悪さしなければ自由に使ってもらって構いません
* @javascript_url
+ *
+ * 完成させてから気づいたが、 https://stackoverflow.com/a/25197219/4006322 にもっと定評のあるよい実装があった
*/
var result = location.href.match(/https:\/\/calendar.google.com\/calendar\/.*\/eventedit\/([0-9a-zA-Z]+)/);
/*
* @title google calendarのpermalink作成
* @description googleカレンダーの予定編集画面からpermalinkを作ります
* @include https://calendar.google.com/
* @license 悪さしなければ自由に使ってもらって構いません
* @javascript_url
*
* 完成させてから気づいたが、 https://stackoverflow.com/a/25197219/4006322 にもっと定評のあるよい実装があった
*/
var result = location.href.match(/https:\/\/calendar.google.com\/calendar\/.*\/eventedit\/([0-9a-zA-Z]+)/);
if (result) {
prompt("Ctrl-Cでコピーしてください。", "https://www.google.com/calendar/event?eid=" + result[1]);
} else alert("対応サイトではありません。");
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。