github→deepwiki
by
xtetsuji
05/08 [2025/05/08 11:41:10]
github.com のページから deepwiki.com に遷移します
@@ -1,15 +1,16 @@
/*
- * @title bookmarklet
- * @description github.com → deepwiki.com
+ * @title github→deepwiki
+ * @description github.com のページから deepwiki.com に遷移します
* @include http://*
* @license MIT License
* @require
*/
-
-if (location.hostname === 'github.com') {
- // プロトコル+ホスト以下を置き換え
- const newUrl = location.href.replace('//github.com', '//deepwiki.com');
- location.href = newUrl;
-} else {
- alert('このブックマークレットは GitHub 上でしか動作しません');
-}
+(function(){
+ if (location.hostname === 'github.com') {
+ // プロトコル+ホスト以下を置き換え
+ const newUrl = location.href.replace('//github.com', '//deepwiki.com');
+ location.href = newUrl;
+ } else {
+ alert('このブックマークレットは GitHub 上でしか動作しません');
+ }
+})();
/*
* @title github→deepwiki
* @description github.com のページから deepwiki.com に遷移します
* @include http://*
* @license MIT License
* @require
*/
(function(){
if (location.hostname === 'github.com') {
// プロトコル+ホスト以下を置き換え
const newUrl = location.href.replace('//github.com', '//deepwiki.com');
location.href = newUrl;
} else {
alert('このブックマークレットは GitHub 上でしか動作しません');
}
})();
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。