openzim / openedx

Open edX (to zim) scraper
GNU General Public License v3.0
8 stars 7 forks source link

Unnecessary cookie warning #113

Closed Popolechien closed 4 years ago

Popolechien commented 4 years ago

A cookie warning appears on top of every page even after I've clicked "ok". Screenshot_20200817_145951_org kiwix kiwixmobile

satyamtg commented 4 years ago

This cookie is triggered by a script in the of the HTML. Since all scripts and styles in the head is scraped at the moment, this pops up. I think the only way to prevent this is by using a block-list, which would be put as a parameter and would contain script names (or a unique string in the script that would be matched for inline scripts) to prevent unnecessary scripts from being added to the ZIM. What do you think of it @rgaudin ? Also, the same block kist can be used to prevent the loading of the script containing a template (which seems unnecessary to me, but I'm not 100% sure), which triggers those invalid links errors.

rgaudin commented 4 years ago

You mean it's phzh specific? I think we should just display: none it via CSS and if that becomes recurrent over various instances with different selectors, create a --hide-css-selector option instead of blocking scripts.