top | item 18044657

(no title)

giodamelio | 7 years ago

It is pretty nifty. They have a Chrome extension too, but that seems like massive overkill so I threw together a quick bookmarklet [1]. You need a decently new browser to use it.

  fetch(
    "https://outlineapi.com/parse_article?source_url=" +
      encodeURIComponent(window.location)
  )
  .then(res => res.json())
  .then(body => {
    if (body.error) {
      return alert(`Outline Bookmarklet Error: ${body.error}`);
    }
    window.location.href = `https://outline.com/${body.data.short_code}`
  })
  .catch(err => {
    alert("Outline Bookmarklet Error. See console for details.");
    console.error(err);
  });
Or minified to be copied directly into bookmark:

  javascript:fetch("https://outlineapi.com/parse_article?source_url="+encodeURIComponent(window.location)).then(o=>o.json()).then(o=>{if(o.error)return alert(`Outline Bookmarklet Error: ${o.error}`);window.location.href=`https://outline.com/${o.data.short_code}`}).catch(o=>{alert("Outline Bookmarklet Error. See console for details."),console.error(o)});
[1]: https://gist.github.com/giodamelio/c97f71a12eec5c142f21f757a...

discuss

order

No comments yet.