blenderskool / untab

🔍 A productivity tool to boost your browser workflow!
https://getuntab.now.sh
MIT License
347 stars 27 forks source link

Plugin with user-defined rule for using "tweak url" products #60

Closed rohitner closed 2 years ago

rohitner commented 3 years ago

Few examples

  1. appending outline.com/ before a web article removes all the clutter from the page
  2. replacing github.com/user/repo with github1s.com/user/repo opens the repo in an online vscode editor
  3. appending ss before a youtube link leads to page where the video can be downloaded

35 is a special case of this functionality

blenderskool commented 3 years ago

Interesting use case, are these expected to be configured by the user or we just provide them out of the box?

rohitner commented 3 years ago

There are multiple ways to do it

  1. We provide them the actions out of the box (code in #61)
  2. 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
  3. Using untab gui plugin which facilitates method 2

Benefit of 2. is user will be able to export the bookmarks to other devices

blenderskool commented 3 years ago

@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:

Open to suggestions 🙂

rohitner commented 3 years ago

Firefox does support javascript bookmarklets!

It would be great to know about rules you would like to have out of the box :).

blenderskool commented 3 years ago

@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:

Not sure how I feel about YouTube video downloading support out of the box, it sounds like it'll go against their terms.

blenderskool commented 2 years ago

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