gabrielmaldi / chrome-lock-tab

Chrome extension to prevent a tab from being closed accidentally
https://chrome.google.com/webstore/detail/lock-tab/nhbdiieigbgalknjplfpgmjnpbnkchnb
16 stars 1 forks source link

Feature Request: Option to automatically lock all pinned tabs #9

Closed ProLoser closed 3 months ago

ProLoser commented 3 months ago

I would like to have all my pinned tabs automatically have lock protection. There's no point in pinning a tab if you can accidentally dismiss it easily in my opinion.

This would make this extension immensely more useful to most people I would think.

I know the property of the tabs exist: https://developer.chrome.com/docs/extensions/reference/api/tabs#property-Tab-pinned

But I can't figure out where to subscribe to some api that lets you know when a tab is pinned or unpinned (or updated?). Honestly even just having a right-click menu to lock the tab or a button to go through and lock all the pinned tabs would be great.

gabrielmaldi commented 3 months ago

I liked your suggestion!

I added the Auto-lock pinned tabs option (which is on by default):

image

I submitted the update to the Chrome Web Store; will notify here when it's published.

Thanks

gabrielmaldi commented 3 months ago

The update is now live: https://chrome.google.com/webstore/detail/nhbdiieigbgalknjplfpgmjnpbnkchnb

ProLoser commented 3 months ago

Wow this is awesome! Thank you for implementing it so quickly!

Some non-deal-breaker notes based around my playing with the feature:

Screenshot 2024-07-09 at 11 47 24 AM

I was thinking most interactions with your extension would happen almost invisibly in the background through my normal primary interaction with chrome.

ProLoser commented 3 months ago

The update is now live: chrome.google.com/webstore/detail/nhbdiieigbgalknjplfpgmjnpbnkchnb

You should update the screenshots and add the new feature to the description to increase discovery

gabrielmaldi commented 3 months ago

You're welcome!

  • I was thinking it would be clearer if the title explained the reason why it was locked "Leave Pinned Tab?" and perhaps the description would be instructions to customize "You can adjust this behavior in the Lock Tab Extension options"

This, unfortunately, can't be done. See: https://github.com/gabrielmaldi/chrome-lock-tab/issues/3#issuecomment-1328033572

  • After unpinning the tab I did not expect it to stay locked. I figured when I unpin the tab it would unlock it as well. I did not expect to have to unlock the tab since I already unpinned the tab.

That was my initial implementation. But I thought about it and there are many corner cases: you may have set up custom rules to always/never lock tabs, you may have clicked the extension icon to lock the tab yourself, etc. As a user I wouldn't expect that a tab that I locked myself (either by clicking the icon or using rules) was unlocked when I unpin the tab; I would expect the tab to stay locked. So the safe bet here is to only lock tabs when they're pinned (if the setting is on), not the other way around. Anyway, the normal use-case here is that pinned tabs remain pinned; if you unpin a tab you can always easily unlock it by clicking the extension icon.

You should update the screenshots and add the new feature to the description to increase discovery

I agree! But I wrote this extension for myself (and users like you who find it useful 😊) and don't want to spend time promoting it/trying to gain users. That's why it's completely open source, has no ads, on donate/buy me a coffee, or anything really besides solving the problem of accidentally dropping off meetings haha. If Chrome ever ships this (very simple) feature in the browser, Lock Tab will be DOA, and I will be glad!