Removed link to bookmarklet because of markdown formatting issues. The bookmarklet's code can be found in the .js file
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
/*
|
||||
The bookmarklet itself
|
||||
*/
|
||||
javascript:(function()%7Bvar%20template%20%3D%20%60%2523%2523%2520title%250Aslug%250Atags%250A%250Abody%60%3Bvar%20isIOS%20%3D%20%2FiPad%7CiPhone%7CiPod%2F.test(navigator.userAgent)%20%26%26%20!window.MSStream%3Bif%20(isIOS)%20%7Bwindow.location.href%20%3D%20%60ulysses%3A%2F%2Fx-callback-url%2Fnew-sheet%3Ftext%3D%24%7Btemplate%7D%26group%3DInbox%60%3B%7D%20else%20%7B(function%20(text)%20%7Bvar%20node%20%3D%20document.createElement('textarea')%3Bvar%20selection%20%3D%20document.getSelection()%3Bnode.textContent%20%3D%20text%3Bdocument.body.appendChild(node)%3Bselection.removeAllRanges()%3Bnode.select()%3Bdocument.execCommand('copy')%3Bselection.removeAllRanges()%3Bdocument.body.removeChild(node)%3B%7D)(decodeURIComponent(template))%3B%7D%7D)()
|
||||
|
||||
/*
|
||||
The following is the expanded code
|
||||
|
||||
@@ -29,8 +34,5 @@ if (isIOS) {
|
||||
})(decodeURIComponent(template));
|
||||
}
|
||||
|
||||
// The following URL is used to convert it to a bookmarklet
|
||||
https://mrcoles.com/bookmarklet/
|
||||
|
||||
// The following is the bookmarklet itself
|
||||
javascript:(function()%7Bvar%20template%20%3D%20%60%2523%2523%2520title%250Aslug%250Atags%250A%250Abody%60%3Bvar%20isIOS%20%3D%20%2FiPad%7CiPhone%7CiPod%2F.test(navigator.userAgent)%20%26%26%20!window.MSStream%3Bif%20(isIOS)%20%7Bwindow.location.href%20%3D%20%60ulysses%3A%2F%2Fx-callback-url%2Fnew-sheet%3Ftext%3D%24%7Btemplate%7D%26group%3DInbox%60%3B%7D%20else%20%7B(function%20(text)%20%7Bvar%20node%20%3D%20document.createElement('textarea')%3Bvar%20selection%20%3D%20document.getSelection()%3Bnode.textContent%20%3D%20text%3Bdocument.body.appendChild(node)%3Bselection.removeAllRanges()%3Bnode.select()%3Bdocument.execCommand('copy')%3Bselection.removeAllRanges()%3Bdocument.body.removeChild(node)%3B%7D)(decodeURIComponent(template))%3B%7D%7D)()
|
||||
// The expanded code is run through the tool at the following link to generate the finished bookmarklet from above.
|
||||
// https://mrcoles.com/bookmarklet/
|
@@ -1,11 +1,9 @@
|
||||
# Bookmarklets
|
||||
|
||||
## Launch Ulysses
|
||||
## [Launch Ulysses](https://libertynode.dev/mdrockwell/bookmarklets/src/branch/master/launch-ulysses.js)
|
||||
|
||||
This is a JavaScript bookmarklet implementation of my Launch Ulysses shortcut from [The Toolkit](https://initialcharge.net/projects/toolkit/).
|
||||
|
||||
If run from an iPhone or iPad, it creates a new sheet in Ulysses, within a group named "Inbox", with my template for writing feature articles.
|
||||
|
||||
If the bookmarklet is run on any other device, it will copy the template to your device's clipboard, which can be pasted into your writing application of choice.
|
||||
|
||||
`<a href="javascript:(function()%7Bvar%20template%20%3D%20%60%2523%2523%2520title%250Aslug%250Atags%250A%250Abody%60%3Bvar%20isIOS%20%3D%20%2FiPad%7CiPhone%7CiPod%2F.test(navigator.userAgent)%20%26%26%20!window.MSStream%3Bif%20(isIOS)%20%7Bwindow.location.href%20%3D%20%60ulysses%3A%2F%2Fx-callback-url%2Fnew-sheet%3Ftext%3D%24%7Btemplate%7D%26group%3DInbox%60%3B%7D%20else%20%7B(function%20(text)%20%7Bvar%20node%20%3D%20document.createElement('textarea')%3Bvar%20selection%20%3D%20document.getSelection()%3Bnode.textContent%20%3D%20text%3Bdocument.body.appendChild(node)%3Bselection.removeAllRanges()%3Bnode.select()%3Bdocument.execCommand('copy')%3Bselection.removeAllRanges()%3Bdocument.body.removeChild(node)%3B%7D)(decodeURIComponent(template))%3B%7D%7D)()">Launch Ulysses</a>` — drag this link into your browser's bookmarks bar to install.
|
||||
If the bookmarklet is run on any other device, it will copy the template to your device's clipboard, which can be pasted into your writing application of choice.
|
Reference in New Issue
Block a user