<?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/coconuts18/rss">
    <link>https://let.hatelabo.jp/coconuts18/rss</link>
    <description></description>
    <title>Bookmarklets from coconuts18</title>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="https://let.hatelabo.jp/coconuts18/let/hJme_PGGiPtq"/>
      </rdf:Seq>
    </items>
  </channel>
  <item rdf:about="https://let.hatelabo.jp/coconuts18/let/hJme_PGGiPtq">
    <link>https://let.hatelabo.jp/coconuts18/let/hJme_PGGiPtq</link>
    <dc:date>2017-05-08T08:53:07Z</dc:date>
    <description>Generates current active page to markdown link format. Makes guthub repo_top/issue/pr links to a formatted title</description>
    <dc:creator>coconuts18</dc:creator>
    <title>[Let] Page2LinkMD</title>
    <content:encoded>&lt;a href="javascript:%22https%3A%2F%2Flet.st-hatelabo.com%2Fcoconuts18%2Flet%2FhJme_PGGiPtq.bookmarklet.js%20%28arg%29%22.replace%28%2F%28%5CS%2B%29%5Cs%2B%28%5CS%2A%29%2F%2Cfunction%28s%2Curl%2Carg%29%7Bs%3Ddocument.createElement%28%22script%22%29%3Bs.charset%3D%22utf-8%22%3Bs.src%3Durl%2B%22%3Fs%3D%22%2BencodeURIComponent%28arg%29%3Bdocument.body.appendChild%28s%29%7D%29%3Bvoid%280%29%3B"&gt;Page2LinkMD&lt;/a&gt;&lt;pre&gt;/*
 * @title Page2LinkMD
 * @description Generates current active page to markdown link format. Makes guthub repo_top/issue/pr links to a formatted title
 * @include http://*
 * @license MIT License
 * @require 
 */

(function(){
var githubRegexp = /^https?:\/\/github.com.*/g;
var githubRepoRegexp = /^https?:\/\/github.com\/([^\/]+)\/([^\/]+)\/?$/g;
var githubIssueRegexp = /^https?:\/\/github.com\/([^\/]+)\/([^\/]+)\/issues\/(\d+)/g;
var githubPullRegexp = /^https?:\/\/github.com\/([^\/]+)\/([^\/]+)\/pull\/(\d+)/g;
var githubTitleXPath = '//*[@id=&amp;quot;partial-discussion-header&amp;quot;]/div[1]/h1/span[1]';

var url = location.href;
var title = &amp;quot;&amp;quot;;

if (githubRegexp.test(url)){
  if (githubRepoRegexp.test(url)) {
    title = &amp;quot;Github &amp;quot; + url.replace(githubRepoRegexp, &amp;quot;$1/$2&amp;quot;);
  } else if (githubIssueRegexp.test(url)) {
    title = &amp;quot;Issue#&amp;quot; + url.replace(githubIssueRegexp, &amp;quot;$3&amp;quot;) + &amp;quot; &amp;quot; + document.evaluate(githubTitleXPath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.innerHTML.trim();
  } else if (githubPullRegexp.test(url)) {
    title = &amp;quot;PR#&amp;quot; + url.replace(githubPullRegexp, &amp;quot;$3&amp;quot;) + &amp;quot; &amp;quot; + document.evaluate(githubTitleXPath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.innerHTML.trim();
  } else {
    title = document.title;
  }
} else {
  title = document.title;
}

title = title.replace(/[\[\]]/g,&amp;quot;\\$&amp;amp;&amp;quot;).replace(/\\$/, &amp;quot;&amp;quot;);

return void(prompt(&amp;quot;Press Ctrl/Cmd + v to copy markdown&amp;quot;, &amp;quot;[&amp;quot; + title + &amp;quot;](&amp;quot; + url + &amp;quot;)&amp;quot;));
})();&lt;/pre&gt;</content:encoded>
  </item>
</rdf:RDF>
