franzenzenhofer/f19n-obtrusive-livetest

new easier whitelist/blacklist management (run/don't run logic)

Closed this issue · 15 comments

site wide setting:

in the settings above the whitelist / blacklist

image

ad a (radio button) setting:

(x) run on every page ( ) only run on whitelisted pages

clicking on “run on every page” ads
*://*
to the whitelist - at the start of the list
(and removed if exists an!*://*entry)

choosing the other option, removes
*://*
and adds
!*://*
to the whitelist / blacklist. (at the start of the list)

note: the setting should be remember over browser restarts and app updates

———————————————————

case: livetest is active (visible)

if livetest is active on page show the icon in color
image

image

  • click on X
  • hides livetest window
  • disables livetest in this tab

image

click on Icon (which is displayed in color)

shows dialog (similar like ) ublock

image

with following options:

Never run tests on

www.example.com/* 
*.example.com/*
this page.

Don’t run in the current tab.

Settings

image

(note: clickable elements should be blue and underlined)

click on

www.example.com/*
(of course substituted on the page with the subdomain, domain you are currently on)

  • hides livetest window
  • adds !*://www.example.com/* to the whitelist/blacklist (if non exists yet)
  • if an entry *://www.example.com/* exists in the whitelist/blacklist this entry is removed
  • reloads the page (with the tests now does not run on this page)

————————-

click on
> *.example.com/*
(of course substituted on the page with the domain you are currently on)

  • hides livetest window
  • adds !*://*.example.com/* to the whitelist/blacklist (if non exists yet)
  • if an entry *://*.example.com/* exists in the whitelist/blacklist this entry is removed
  • reloads the page (with the tests now does not run on this page)

——————————

click on

this page

  • hides livetest window
  • adds a blacklist entry for this URL (without parameters)
  • (if a whitelist entry for this URL (without parameters) does exist, remove it)
  • reloads the page (with the tests now not running on this page)

—————————————

click on

Don’t run in the current tab.

  • Same behavior like a click on [x] in the livetest window.
  • Hide config window.

Click on "Settings" leads to the settings page.

—————————

case livetest is not active

image

icon is displayed in gray

————

if the tests were not running, just because the tests were disabled in this tab (because of a previous click on the X in the livetest window) or a click on “Don’t run in the current tab.”

  • enable livetests in this window
  • the page gets reloaded
  • with the tests now running

——————————

if the tests were not running, because of a blacklist entry

Display following dialogue

Always run tests on

www.example.com/* 
*.example.com/*
this page.

Settings

————————-
image

click on
> www.example.com/*
(of course substituted on the page with the subdomain, domain you are currently on)

  • adds *://www.example.com/* to the whitelist/blacklist (if non exists yet)
  • if an entry !*://www.example.com/* exists in the whitelist/blacklist this entry is removed
  • reloads the page (with the tests now run on this page)

———————-
click on
> *.example.com/*
(of course substituted on the page with the protocoll, subdomain, domains you are currently on)

  • adds *://*.example.com/* to the whitelist/blacklist (if non exists yet)
  • if an entry !*://*.example.com/* exists in the whitelist/blacklist this entry is removed
  • reloads the page (with the tests now run on this page)

click on

this page.
(of course substituted on the page with the protocoll, subdomain, domains you are currently on)

  • adds an enabling entry to the whitelist - of this URL - without any parameters
  • if an disabling entry is in the whitelist/blacklist - of this URL wihtout any paramters - the entry is removed
  • reloads the page (with the tests now run on this page)

——————————-

Click on "Settings" leads to the settings page.


the whitelist/blacklist entry should prevail with app updates and browser re-starts.

added "Settings" option in the overlay.

case http://www.karriere.at/

i.e.: https://www.karriere.at/jobs/4960296

IS:

Never run tests on
www.karriere.at/*
*.www.karriere.at/*
*.karriere.at/*
this page

SHOULD:

Never run tests on
www.karriere.at/*
*.karriere.at/*
this page

.www.karriere.at/
doesn't make sense

click on:

www.karriere.at/* -> this blacklist entry -> !https://www.karriere.at* (OK)
*.www.karriere.at/* -> this blacklist entry -> !https://*.karriere.at* (OK, but wrong link text, should be *.karriere.at/*)
*.karriere.at/* -> this blacklist entry -> !https://*..at* (NOT OK, should not exit )
this page -> blacklist enttry -> !https://www.karriere.at/jobs/4960296 (OK)

same partly wrong behavior with the whitelist function if page was disabled

@franzenzenhofer thanks. should both be fixed now.

So far so good, testing more pages right now

the "site wide feature" is still open (see original spec)

image

True. What should happen when i click on "run on every page" but already have existing entries in my list? Delete everthing? Insert "://" on top of the list? Same question for "only run on whitelisted pages".

IS: blacklist entry is domain sensitive

i.e.: on https://www.karriere.at/jobs/4960296

in the overlay click on

www.karriere.at/* -> leads to this blacklist entry -> !https://www.karriere.at*
*.karriere.at/* ->  leads to this blacklist entry -> !https://*.karriere.at*

SHOULD: blacklist entry is domain insensitive

www.karriere.at/* -> leads to this blacklist entry -> !*://www.karriere.at*
*.karriere.at/* ->  leads to this blacklist entry -> !*://*.karriere.at*

note, this must also be considered in the blacklist entry / remove logic

reasoning: i believe the treat http/https as one is in the majority of the time the desired behaviour.
if they want to treat protocols differently then they have to go into the blacklist manually

good point, but I only want to manage the default behaviour

the default behaviour is that the first entry is

*://*

this setting just switches the default behaviour, so that the first entry is

!*://*

this setting does not touches the rest of the rules, just either

changes the first line (if *://* or !*://* is present)

or ads
!*://* or *://*
if there is something else in the first line.

but yeah, the wording should be that is just deals with default behaviour

Default behavior: (x) run on every page ( ) only run on whitelisted pages

(note: the active button is set based on existence of !*://* or *://* in the first line, if none, then none of these buttons should be selected

first line: *://* -> (x) run on every page
else if the first line is: !*://* -> (x ) only run on whitelisted pages
if none apply, none of the radio buttons is active
)

of course I'm very open for a better solution / wording
#loveradiobuttons

@neuling big question, would a "Reset Whitelist/Blacklist to Default" Button (and functionality) be feasible. if browsing around I see that is is indeed easy to get a huge and slightly screwed up whitelist/blacklist. so a "factory reset" would be awesome

@franzenzenhofer disable, enable or custom configuration + reset configuration is now implemented.

8whrvny7ig

disabled internally maps to "://", disabled to "!://" and custom configuration will use the list below.

two things i am not sure about if its correct implemented.

  1. i would say it makes sense to disable/hide the custom configuration (black/whitelist) in some way when "run on every site" or "disabled" is selected since changes will have no effect.

  2. if "disabled" or "run on ever site" is selected and you open the popup and add a custom rule, the mode will automatically switch to "custom configuration" and the site will be added or removed.

pls test the current implementation and give some feedback. thanks.

hi @neuling

sadly not what I want and need, that is why I strongly prefer written spec discussions.

  • I do not want to manage total behavior. (no enable on all sites, no kill switch to overall disable)
  • I want to manage default behavior. (with a simple setting)

what I need:

image

Please add the Options:

Default behaviour: () Run on every page (default enable) () Only run on enabled pages (default disable)

Default is
1 () Run on every page (default enable)
selecting this

looks into the blacklist for any exact match of
!*://*
and deletes all these entry
and adds
*://*
as the first entry

The other option is
1 () Only run on enabled pages (default disable))
selecting this

looks into the blacklist for any exact match of
*://*
and deletes all these entries
and adds
!*://*
as the first entry

the setting looks into the first line of this blacklist/whitelist to determine if the the radio button is set to 1 or 2

please enable this behavior
I will later rework the interface to name the total behavior ,mode differently as I do not want to cover it prominently.

@franzenzenhofer done. pls re-test.

hi moritz
somtimes it crashes... and the old location get stuck
image
any idea? turning it (the browser) on and off again seems to work. hard to replicate

ah, thanks. got it. it happens if you have two (or more) browser windows open. should be fixed by this commit: 5d3f4f2

looks very good and just works #done