I have released a Safari extension.
@ruwatana here. I am an engineer.
This is my first post on note. Thank you for your support️
I have developed and released a Safari extension called "Copy Link to Pasteboard", which allows you to copy the URL of the page currently displayed in Safari to your clipboard in various formats such as Markdown or HTML via a right-click.
I am writing this down while the details of how I came to develop it are still fresh in my mind.
It is free, so please feel free to install and try it out from the link below
Using Safari as your default Mac browser
Which browser app do you use on your iPhone?
I imagine most people use the pre-installed Safari app.
But what about on a Mac...?
I think opinions are quite divided on this, and many people likely use third-party apps like Chrome.
After all, Chrome has the major advantage of havinga wealth of extensions.
However, if you use Safari on your iPhone, Safari is the clear winner in terms ofmobile integration (syncing bookmarks, history, and information about currently open tabs).
The link-copying extension I valued most in Chrome
The extension I found extremely useful wasa URL link copying extension.
I often use tools like GitHub and Slack, and when I wanted to share long URLs, pasting them as-is would take up too much text space, or I wouldn't know what kind of page it was, leading to unnecessary clicks.
Manually fetching the title from the source, constructing Markdown, or adding hyperlink settings for every link description is a huge hassle.
That was when I discovered that there were URL link copying extensions in the Chrome Store.
Once I installed one, I could easily specify various formats like Markdown or HTML via right-click depending on the situation, and by simply pasting, a link consisting of the title and URL would be generated and copied, which greatly improved my efficiency in creating documents and posts.
I even started to feel stressed when working without this extension (lol).
Because of that, I was using Chrome as my main browser on my PC (Mac).
However, I found myself wishing more and more each day that I could benefit from browsing data integration with my iPhone and use Safari as my default browser.
Safari has extensions too, but...
So, I thought I could just install a similar extension for Safari.
However,there were no link-copying extensions for Safari that allowed for such multiple format specifications (there were extensions that only supported Markdown).
Even though there are so many for Chrome...
If it doesn't exist, just make it.
Being able to do this is the privilege of an engineer
I was able to apply to the App Store and release it in about a week from the initial idea! (Since I work during the week, the actual time spent on it was about 10-20 hours.)
Fortunately, since I already had skills in the iOS ecosystem and basic JavaScript development, I didn't have any particular trouble gathering information from Apple or implementing the Safari extension.
However, this was my first time developing a Safari extension, and since I implemented it using the new Safari Web Extensions which became available in Safari 14, I might write a separate article about it if I get the chance.
To get a little technical, until now, only the Safari App Extensions API, which was unique to Safari, was provided. However, with the advent of Safari Web Extensions, it has become possible to use the WebExtensions API, which is compatible with Chrome and Firefox extensions, directly in Safari.
Now you can copy in Markdown or HTML format in Safari too
By releasing this extension, it is now possible to copy links by right-clicking and specifying various formats (currently supporting 6 types of link formats) as shown below.
You can handle various situations, such as Markdown for pasting into GitHub, RTF HyperLink (or HTML) if you are using something that supports pasting hyperlinks like Slack, or Title and URL if you want to display both the title and the URL.
It's simple, but it's really convenient!
(I'm grateful for the idea from the developer who first created the Chrome extension.)
Finally
With this, I can finally set Safari as my default app on my Mac and enjoy the benefits of mobile integration!
If you encounter any bugs or have requests for features you'd like to see, I would appreciate it if you could contact me on Twitter ️ (Please follow me too!)
https://twitter.com/ruwatana