go KUCHIYOSE

  • /*
     * @title go KUCHIYOSE
     * @description 現在のWebページをNostrでブックマークするためにKUCHIYOSEに遷移
     * @include http://*
     * @license CC0 1.0
     * @javascript_url
     */
    
    (() => {
    	const website = 'https://kuchiyose.vercel.app/';
    	const url = new URL(location.href);
    	url.search = '';
    	url.hash = '';
    	const identifier = url.href
    		.replace(/#$/, '')
    		.replace(/\?$/, '')
    		.replace(/^https?:\/\//, '');
    	const title = document.title;
    	const usp = new URLSearchParams({
    		d: identifier,
    		title
    	});
    	const urlToGo = `${website}entry/${identifier}?${usp.toString()}`;
    	location.href = urlToGo;
    })();
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2025/06/22 07:43:13 - 06/22