dhowe / ChinaEye

Experience the web as if you were living in China...
Artistic License 2.0
9 stars 3 forks source link

Bug: search page stays redacted after a new non-blocked search #30

Closed dhowe closed 7 years ago

dhowe commented 7 years ago

After a page is redacted b/c of a search, it stays redacted even after a new non-blocked search. Here is a search for 'happiness':

screen shot 2017-02-13 at 1 45 17 pm

after searching for 'grass mud horse'

cqx931 commented 7 years ago

This bug does not happen to every search.

If I open a new tab and search in the search box/ If I search directly from the address bar in chrome, the address looks like below, and redact doesn't stick. https://www.google.com.hk/search?q=s&oq=s&gs_l=serp.3..0i131k1j0j0i131k1l3j0l5.8951.9129.0.9279.1.1.0.0.0.0.57.57.1.1.0.hmcntre%2Chm-qwp-shp-ido%3D1%2Chm-qwp-shp-hmbtialc%3D1%2Ccfro%3D1...0...1.1.64.serp..0.1.56.J5kQVuYbZ5Y

If I go to google.com in address bar, then search in the search box, the address is in the same format as your screenshot: https://www.google.com.hk/?gfe_rd=cr&ei=Dq5vV8iiN42T9QX11Z24CQ&gws_rd=ssl#q=s

So when the search link looks like the above, the page won't reload, the content as well as the url is changed by script. This scenario is a bit tricky and I am looking into it.

dhowe commented 7 years ago

may just need a listener for when the url changes ?

cqx931 commented 7 years ago

there is already a listener for when the url changes. When the page is rechecked triggered by url changes, the style is unchanged, which means that all the redact style tags are still there.

I have changed the redact method, so that it can either add or remove redact style according to the status. Please check here. https://github.com/dhowe/ChinaEye/pull/32