<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel rdf:about="https://let.hatelabo.jp/KEINOS/rss">
    <link>https://let.hatelabo.jp/KEINOS/rss</link>
    <description></description>
    <title>Bookmarklets from KEINOS</title>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="https://let.hatelabo.jp/KEINOS/let/hLHXyvKd_-JM"/>
      </rdf:Seq>
    </items>
  </channel>
  <item rdf:about="https://let.hatelabo.jp/KEINOS/let/hLHXyvKd_-JM">
    <link>https://let.hatelabo.jp/KEINOS/let/hLHXyvKd_-JM</link>
    <dc:date>2017-09-06T12:22:37Z</dc:date>
    <description>今開いているページのタイトルと URL (と選択テキスト) をマストドンでトゥートするためのウィンドウを開きます。</description>
    <dc:creator>KEINOS</dc:creator>
    <title>[Let] このページを?る</title>
    <content:encoded>&lt;a href="javascript:%28%28i%2Cd%3Ddocument%2Cs%3D%28%27%27%2BgetSelection%28%29%29.trim%28%29%2Cp%29%3D%3E%7Bf%3De%3D%3E%7Bopen%28%27https%3A%2F%2F%27%2B%28e.target%3Fe.target.textContent%3Ae%29%2B%27%2Fintent%2Fstatuses%2Fnew%3Ftext%3D%27%2BencodeURIComponent%28d.title%2B%27%5Cn%27%2B%28%28d.querySelector%28%27head%20meta%5Bproperty%3D%22og%3Aurl%22%5D%5Bcontent%5D%27%29%7C%7C%7B%7D%29.content%7C%7C%28d.querySelector%28%27head%20link%5Brel%3D%22canonical%22%5D%5Bhref%5D%27%29%7C%7C%7B%7D%29.href%7C%7Clocation.href%29%2B%28s.length%3F%60%5Cn%22%24%7Bs%7D%22%60%3A%27%27%29%29%2C%27QiitaIntent%27%2C%60width%3D450%2Cheight%3D300%2Cleft%3D%24%7B%28screen.availWidth-450%29%2F2%7C0%7D%2Ctop%3D%24%7B%28screen.availHeight-300%29%2F2%7C0%7D%60%29%3Bif%28p%29d.body.removeChild%28p%29%7D%3Bif%28i.length%3D%3D1%29return%20f%28i%5B0%5D%29%3Bp%3Dd.body.appendChild%28Object.assign%28d.createElement%28%27fieldset%27%29%2C%7Bstyle%3A%60background-color%3A%20white%3B%20position%3A%20fixed%3B%20z-index%3A%20%24%7BNumber.MAX_SAFE_INTEGER%7D%3B%20top%3A%200%3B%20bottom%3A%200%3B%20left%3A%200%3B%20right%3A%200%3B%20margin%3A%20auto%3B%20padding%3A%201em%3B%20width%3A%2020em%3B%20height%3A%20%24%7Bi.length%2B1%7Dem%3B%60%7D%29%29%3Bi.forEach%28%28n%3D%3Ep.appendChild%28Object.assign%28d.createElement%28%27button%27%29%2C%7BtextContent%3An%2Cstyle%3A%27all%3A%20initial%3B%20background%3A%20silver%3B%20color%3A%20black%3B%20border%3A1px%20solid%20gray%3B%20display%3A%20block%3B%20margin%3A%20auto%3B%20height%3A%201em%3B%27%7D%29%29.addEventListener%28%27click%27%2Cf%29%29%29%7D%29%28%5B%27qiitadon.com%27%5D%29%3B"&gt;このページを?る&lt;/a&gt;&lt;pre&gt;/*
 * @title このページを?る
 * @description 今開いているページのタイトルと URL (と選択テキスト) をマストドンでトゥートするためのウィンドウを開きます。
 * @include *
 * @license MIT License
 * @javascript_url
 */

/*
https://github.com/tootsuite/mastodon/commit/c452e0b250c4484e2bbc3eed7fa65af8a473c301
が本家に来た時用に拡張した。
https://mstdn.maud.io/@hota/1686580
コンフリクト起こってるらしい。
*/
 
((i, d = document, s = ('' + getSelection()).trim(), p) =&amp;gt; {

	f = e =&amp;gt; {

		open('https://' + (e.target ? e.target.textContent : e) + '/intent/statuses/new?text='
		+ encodeURIComponent(d.title + '\n' + (
			// 元のコード: https://gist.github.com/noromanba/d730ccf3ae5e6916cd60
			(d.querySelector('head meta[property=&amp;quot;og:url&amp;quot;][content]') || {}).content ||
			(d.querySelector('head link[rel=&amp;quot;canonical&amp;quot;][href]') || {}).href ||
			location.href
		) + (s.length ? `\n&amp;quot;${s}&amp;quot;` : '')), 'QiitaIntent',
			`width=450,height=300,left=${(screen.availWidth-450)/2|0},top=${(screen.availHeight-300)/2|0}`
		);

		if (p) d.body.removeChild(p);

	};

	if (i.length == 1) return f(i[0]);

	p = d.body.appendChild(Object.assign(d.createElement('fieldset'), {
		style: `background-color: white; position: fixed; z-index: ${Number.MAX_SAFE_INTEGER}; top: 0; bottom: 0; left: 0; right: 0; margin: auto; padding: 1em; width: 20em; height: ${i.length + 1}em;`
	}));
	i.forEach(n =&amp;gt; 
		p.appendChild(Object.assign(d.createElement('button'), {
			textContent: n,
			style: 'all: initial; background: silver; color: black; border:1px solid gray; display: block; margin: auto; height: 1em;'
		})).addEventListener('click', f)
	);

})([
/*
ひとつまで減らすと選択肢出ずにそのまま窓が開く
*/
'qiitadon.com',
//'music.pawoo.net',

]);&lt;/pre&gt;</content:encoded>
  </item>
</rdf:RDF>
