gab-ai-inc / gab-dissenter-extension

Dissenter.com Browser Extension source code
https://dissenter.com
Apache License 2.0
272 stars 43 forks source link

Images & JavaScript don't load in extension-controlled browser views on Brave #44

Closed ghost closed 5 years ago

ghost commented 5 years ago

The Dissenter iFrame isn't loading Javascript or Images on Brave.

Dissenter works fine if I open the exact same url in an actual tab. I've tried disabling uMatrix and manually whitelisting dissenter in Site Settings and still nothing.

Using the network inspector shows that the iFrame isn't requesting images or javascript, however even when dissenter is manually whitelisted in Site Settings it doesn't seem to effect the iFrame. https://i.imgur.com/bIe8VHC.png

Since fonts are being blocked I'd have to assume Brave's shields are doing something.

This issue only effects pages/views controlled by the extension, opening the exact same URL in a normal windows works just fine, even with Brave Shields on. https://i.imgur.com/g6x0Tyk.png

I'd assume this probably is a side-effect of Brave's aggressive Shields, or Site Settings effecting extension-controlled popups/views differently.

Gab Thread

mgabdev commented 5 years ago

Hi @kakolisgay thanks for submitting an issue. I am not experiencing this problem when I give a test on Brave just now. However, that may be due to us having different settings or activated shields... Given that, would you mind listing here (or screenshotting if you prefer) what type of settings you have within Brave as well as the version number.

Also, the "Gab Thread" link you have heads to a 404.

Looking forward to hearing back and seeing how I can help.

ghost commented 5 years ago

@mgabdev I think gab changed the post id for the thread, fixed it now.

Brave: 0.60.47 Chromium: 72.0.3626.119 Brave Shields: image Site Settings (Dissenter is whitelisted for both): image

Site settings aren't exclusive to brave, they're a chromium feature so you may want to test these settings on chromium first.

mgabdev commented 5 years ago

Hi @kakolisgay, I have discovered a solution. In order to get javascript and images working from within the extension, it is not only necessary to include dissenter.com as a whitelisted website (in order to get the main website working) but to also add the extension's unique url to the whitelist for javascript and image blocking.

In order to find the extension's unique url, you can navigate to the extensions page (e.g. brave://extensions), find the Dissenter Extension, click the "Details" button, scroll down and find "ID". For example, on my computer the ID is showing up as: hfmlagllaeboigmfkcdlbfooibmknapj. (It very well may be different on your computer).

Once you have that ID, you will then need to navigate to the settings page to edit the javascript and images URL whitelist. Input the whitelisted url with the following pattern: chrome-extension://[ID] For example, in my case, it would be: chrome-extension://hfmlagllaeboigmfkcdlbfooibmknapj

Once I have added that extension URL to the whitelist for both javascript and images, the extension works as intended.

Please let me know if this solution works for you.

ghost commented 5 years ago

@mgabdev Yeah works for me, you might be able to automate this by using Chrome's site permission api or just by writing a help article and pointing users to it if they have javascript disabled and are requesting the extension-specific page.

Also while I've got your ear, you might want to offer a .crx download. Running the extension from source as the suggested method isn't exactly user friendly, you can offer auto-updates from your own metal too.

https://developer.chrome.com/extensions/hosting https://developer.chrome.com/extensions/linux_hosting

ghost commented 5 years ago

Also, clicking on external links results in this. image

mgabdev commented 5 years ago

@kakolisgay With the latest release of r9 (https://github.com/gab-ai-inc/gab-dissenter-extension/releases/tag/r9), a .crx file has been circulated. For all other issues, please submit a new issue. Thanks!