Plugin with user-defined rule for using "tweak url" products
rohitner opened this issue · 6 comments
Few examples
- appending
outline.com/
before a web article removes all the clutter from the page - replacing
github.com/user/repo
withgithub1s.com/user/repo
opens the repo in an online vscode editor - appending
ss
before a youtube link leads to page where the video can be downloaded
#35 is a special case of this functionality
Interesting use case, are these expected to be configured by the user or we just provide them out of the box?
There are multiple ways to do it
- We provide them the actions out of the box (code in #61)
- User configures the actions creating a javascript bookmarklet(examples below) and use untab to trigger it (no change needed in code)
javascript: window.location.href = window.location.href.replace(/github(1s)?.com/, function(match, p1) { return p1 ? 'github.com' : 'github1s.com' })
javascript: window.location.href = "https://outline.com/" + window.location.href
- Using untab gui plugin which facilitates method 2
Benefit of 2. is user will be able to export the bookmarks to other devices
@rohitner Interesting, I did not know bookmarks could store javascript scripts too! Is this supported in Firefox?
I think this is how we can go about this:
- Provide some rules out of the box.
- Pro users(who are familiar with JS) can create JS bookmarklet with their own features, that UnTab can pick up and trigger them.
- Maybe in the future, make a separate interface (probably something like UnTab settings page) which makes this process of adding these bookmarklets easier.
Open to suggestions 🙂
Firefox does support javascript bookmarklets!
- As of now, I have added the implementation of outlining articles in #61. Let me know if you are thinking of something else regarding the implementation.
- I am trying to figure out how to download youtube videos using a single button instead of redirecting to another website.
It would be great to know about rules you would like to have out of the box :).
@rohitner Great to hear that Firefox supports them too!
#61 looks good, I'll do the code review on the PR soon.
I'm not fully sure which ones we can add out of the box. Here are a few that came to my mind:
https://tinyurl.com/create.php?url=
for shortening current page linkoutline.com
andgithub1s.com
that you suggested also seem cool.
(Thegithub1s.com
should only show up when user is on a GitHub repo though)- one for wayback machine? (I don't know if this is any helpful though)
Not sure how I feel about YouTube video downloading support out of the box, it sounds like it'll go against their terms.
Closing this as some of the actions discussed here have been added.
Discussion on user-configured actions using bookmarklets/normal JS scripts can now be on #85