Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Add to Whitelist Button to Whitelist Toggle Button #1

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Elliot-TS
Copy link

I made it easier to remove websites from the white list but making the "Whitelist this tab's domain" button in the context menu into a button adds the website to the whitelist if it's not already in the whitelist and removes it if it is. I've also changed the name of the button to reflect that (Add/Remove tab from Whitelist). As this is my first time doing anything with browser extensions, I don't know if there's a way to make the name of the button be "Add tab to Whitelist" if it's not already in the whitelist and "Remove tab from Whitelist" if it is, but if you know of a way to do that and you have the time, that would probably be ideal.

In the context menu, if the user clicks the whitelist button and the domain is already in the whitelist, it will remove it.  This (along with changing the name of the context menu button) will provide a much easier and much faster method of removing websites from the whitelist, a feature that at least I would use a lot (I often used that feature in another image blocker), and I'm sure others would benefit from it as well.

PS.  This is my first time committing to a GitHub repository and my first time working on an extension, so please let me know if I'm doing anything wrong.  I've only tested it in Chromium on Linux, but it's simple enough that it should work on other browsers/systems.
I changed the name of the whitelist button in the context menu to make it clearer that it would toggle the tab's domain in the whitelist.  I don't know if there's a way to have it say "Add tab to Whitelist" if it's not already in the whitelist and "Remove tab from Whitelist" if it is, but if you know of a way to do that and you have the time, that would probably be ideal.
Add Ability to Remove from Whitelist in Context Menu
Update Whitelist Name to Reflect Changes in background.js
Change default behavior of clicking on extension from temporarily disable to whitelist.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant