ulyngs / mindshield-open-source

https://apps.apple.com/gb/app/mindshield/id1660218371
6 stars 2 forks source link

Adds Reddit and support for injecting to shadow-DOMs #38

Closed SuneGraversen closed 1 month ago

SuneGraversen commented 1 month ago

Handles #37 and #6

37 through a dictionary of hideable elements as key, with a CSS-selector string as value.

https://github.com/SuneGraversen/mindshield-open-source/blob/ef4837fa5124fe088746f388fa48323cf7dfd5b4/Shared%20(Extension)/Resources/content.js#L186C1-L191C6

The extension then assumes the CSS-selector represents a unique method to find the root of the shadow DOM, and either injects scripts into the shadowRoot or the head of the document-dom. https://github.com/SuneGraversen/mindshield-open-source/blob/ef4837fa5124fe088746f388fa48323cf7dfd5b4/Shared%20(Extension)/Resources/content.js#L197C8-L205C11

ulyngs commented 1 month ago

This is great, thank you Sune!! Did you test this on all platforms (iPhone, iPad, Mac) or is your current implementation just for Mac?

SuneGraversen commented 1 month ago

Only tested for MacOS:)