Last active
April 4, 2022 13:01
-
-
Save giodamelio/c97f71a12eec5c142f21f757a6ba4d8a to your computer and use it in GitHub Desktop.
A bookmarklet to process the current page to Outline.com and redirect afterwards.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch( | |
"https://outlineapi.com/v3/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); | |
}); |
Just add this as your bookmark and outline.com will take care of the rest
javascript:window.location='https://outline.com/' + window.location
(adding this comment because I got here when trying to create a bookmarklet, but could not get this to work with cross origin policy restrictions)
Just add this as your bookmark and outline.com will take care of the rest
javascript:window.location='https://outline.com/' + window.location
yup, this works. thank you 🙏
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I copy and paste the script into Firefox address properties in bookmarks the save button does not function. How do I add this bookmarklet?