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

Implemented preview of tab names that match programmed patterns in WHITELIST #886

Closed
wants to merge 1 commit into from

Conversation

garethgeorge
Copy link

@garethgeorge garethgeorge commented Mar 14, 2019

In particular, when trying to create regex with the great suspender that match various tab names I encountered a great deal of difficulty testing if my regex were actually working.

I implemented a mockup of what a preview of 'matching tabs' which would be whitelisted based on the tabs that are currently open in the user's browser would look like. At the moment I simply show the page title's.

For example, in my case I added a simple rule to just exclude any pdf's from being excluded (with a few pdf's already open in my browser)
image

Note: this is more of a feature request/example implementation than necessarily a final product to be merged.

@garethgeorge
Copy link
Author

As a side note, in implementing this feature I suspect that I am either not understanding the Regex feature or that the feature is broken because, whenever I test with a regex in the whitelist, for example, the regex /*/, no matches are found according to this implementation and also when I set the timeout to 20 seconds for tab suspension.

deanoemcke added a commit that referenced this pull request Mar 15, 2019
@deanoemcke
Copy link
Collaborator

deanoemcke commented Mar 15, 2019

@garethgeorge thanks so much for this great idea!
i liked it so much that i've pushed it into the current release candidate.
i hope you dont mind, but i haven't used any of your code, as i felt it would be better implemented with a button.
to keep things simple i'm using the window.alert modal. this does mean that the output is limited to the number of matching urls it can show.
Let me know what you think: bb1ca74

@deanoemcke
Copy link
Collaborator

@garethgeorge oh, and /*/ is not a valid regex.
* means zero or more of, and needs to be preceded by a character to match. ie:
/x*/ would match zero or more x characters
/[0-9]*/ would match zero or more numbers from 0 to 9
/.*/ would match ANY character zero or more times (. is a special character)

So what you probably meant to do with /*/ is actually /.*/

@garethgeorge
Copy link
Author

@deanoemcke you are totally right, I was indeed just being dumb. It seems simple regex do work! So there is just something wrong with my more complicated ones.

Also, I agree that using an alert/validation button is a better way of doing things -- it certainly gets around certain aesthetic issues with the 'stick the listings in the middle of the page' approach.

Glad you liked the idea! Thanks for putting it in 👍

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.

2 participants