franzenzenhofer / f19n-obtrusive-livetest

A sandboxed, extendable testing chrome extension and framework! It runs pre-defined and custom tests on each page that you visit.
https://chrome.google.com/webstore/detail/f19n-obstrusive-live-test/jbnaibigcohjfefpfocphcjeliohhold?hl=en
55 stars 1 forks source link

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

Closed franzenzenhofer closed 6 years ago

franzenzenhofer commented 6 years ago

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

1)

image

2)

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)

————————-

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

——————————

click on

this page

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

click on

Don’t run in the current tab.

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.”

——————————

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)

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

click on

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

——————————-

Click on "Settings" leads to the settings page.


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

franzenzenhofer commented 6 years ago

added "Settings" option in the overlay.

franzenzenhofer commented 6 years ago

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

neuling commented 6 years ago

@franzenzenhofer thanks. should both be fixed now.

franzenzenhofer commented 6 years ago

So far so good, testing more pages right now

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

image

neuling commented 6 years ago

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".

franzenzenhofer commented 6 years ago

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

franzenzenhofer commented 6 years ago

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

franzenzenhofer commented 6 years ago

@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

neuling commented 6 years ago

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

franzenzenhofer commented 6 years ago

hi @neuling

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

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.

neuling commented 6 years ago

@franzenzenhofer done. pls re-test.

neuling commented 6 years ago

u52tk7uoui

franzenzenhofer commented 6 years ago

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

neuling commented 6 years ago

ah, thanks. got it. it happens if you have two (or more) browser windows open. should be fixed by this commit: https://github.com/franzenzenhofer/f19n-obtrusive-livetest/commit/5d3f4f2a78ce1e8d6ef0b47655d0d05054fccbe7

franzenzenhofer commented 6 years ago

looks very good and just works #done