adguardteam / adguardbrowserextension Goto Github PK
View Code? Open in Web Editor NEWAdGuard browser extension
Home Page: https://adguard.com/
License: GNU General Public License v3.0
AdGuard browser extension
Home Page: https://adguard.com/
License: GNU General Public License v3.0
Ok, that's weird.
Steps to reproduce:
You'll see that HTTPS requests are broken - FF counts our server cert invalid.
This issue will be fixed after you open any HTTPS page signed with Godaddy certificate (https://godaddy.com for instance). After that FF will accept our certs too.
We should report this bug to mozilla.
It seems that CSS styles injected to shadow dom has higher priority than even inline styles.
Please check if I am right before implementing this.
We should change the way UI communicates with core.
Use messages/events instead of the current way.
Thus we'll fix the issue with access to "Components" object in Firefox.
Hello,
I am using latest 2.0.7 version on my latest Chromium 44 build.
I use my browser always in incognito mode. When I visited a phishing page, Adguard opens another browser window to show its alert about phishing.
Why I can't see the alert in incognito mode? Adguard closes the phishing tab in incognito windows and then Adguard opens a new browser window to show alert.
Can you please look into it?
Why adguard did not show alert in incognito mode?
If you have question please ask I want to help.
Thanks,
1) in preload.js you use:
setTimeout(function () {
this.tryLoadCssAndScripts.bind(this);
}, 100);
which will not work. Aside from the this object being different in the inner function, you are not actually calling the bound function. This will work instead if you are ok with an ES6 version, otherwise I'm sure you'll know what to change.
setTimeout(() => this.tryLoadCssAndScripts(), 100);
You can also just use setTimeout(this.tryLoadCssAndScripts.bind(this), 100); the validator warning that shows up for that will usuall be ignored by reviewers, since they see that you are actually passing a function.
2) In resources/adguard-adblocker/lib/main.js, shouldn't that last line be __proto__ instead of __proto ? I guess this can also be cleaned up using Object.create(null) as mentioned previously.
3) I'm a little worried about the applyScripts method. I read you are injecting remote scripts only for non-Firefox, but I have to rummage through multiple levels of function calls to figure out if that is really the case. If you could add another check for isFirefoxBrowser closer to the applyScripts method, that would be super.
Detailed description:
AdguardTeam/AdguardForAndroid#162
https://chrome.google.com/webstore/detail/buffer/noojglkidnpfjbincgijbaiedldjfbhh?hl=en
Adg on - http://imgur.com/eiLKtDj
Adg off - http://imgur.com/bUql23Z
Reproduced both on Mac&Win.
POG-728-35527
When adding whitelist/blacklist entries, neglecting www. or other subdomain prefixes will not work. If I enter "domain.com", what it means is really ".domain.com/". The interpretation should be built-in.
If users copy and paste the URL from address bar, the URL will include protocol, i.e. http:// or https://. The whitelist doesn't work with protocols included. Users must enter the bare domain. Also inconvenient.
Adguard cannot detect the main frame while FF is working in e10s mode.
More info about that issue here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1108827
With current shims implementation I don't see a proper way to fix that.
Workaround:
As we now cannot get DOMWindow and detect iframes, we change recording of the main frame (do not allow to change main frame until 3 seconds has passed).
We should integrate Adguard with Firefox Developer Tools.
Add Adguard button (or sidebar panel if it's possible) to FF dev tools Inspector.
https://dxr.mozilla.org/mozilla-central/source/browser/devtools/framework/gDevTools.jsm
Look how it's done in element hiding helper:
https://github.com/adblockplus/elemhidehelper/blob/master/lib/inspectorObserver.js
More info on CPOW:
http://mikeconley.ca/blog/2015/02/17/on-unsafe-cpow-usage-in-firefox-desktop-and-why-is-my-nightly-so-sluggish-with-e10s-enabled/
Caused by using ElemHide.collapseNode method. In multi-process environment working with nodes from the chrome process is slow because every time it is an IPC method call.
Temporary solution: do it chromium-way. I mean let's collapse elements from the content script in case if e10s is used.
Steps to reproduce:
Expected result:
Filter is added to the list
Result:
Filter is not added to the list until page refresh
Steps to reproduce:
In integration mode rules should be added to desktop AG user filter
When both extension and Adguard for Windows or Mac are enabled there could be a problem with JIRA. Some requests are stalled after dashboard refresh.
We have "Blocked", why not "Whitelisted"?
@@||domain.com^$elemhide exclude urls, but it must only disable element hiding
http://savepic.org/7645456.jpg
When you copy to clipboard a redirect link from google search result, copy the direct link instead.
FGR-836-78048
Read this article:
https://www.webkit.org/blog/4062/targeting-domains-with-content-blockers/
We can try something like that:
UrlFilterRule.REGEXP_SEPARATOR = «([:/]|$)»
UrlFilterRule.REGEXP_START_URL = "^https?://([^:/]+\\.)?";
I am not yet sure if it's ok, we should also check unit tests.
Useful information:
https://www.webkit.org/blog/3476/content-blockers-first-look/
https://www.hackingwithswift.com/safari-content-blocking-ios9
Some examples:
https://github.com/snoack/abp2blocklist/blob/master/abp2blocklist.js
https://raw.githubusercontent.com/snoack/abp2blocklist/master/easylist.json
https://lists.webkit.org/pipermail/webkit-help/2015-June/003930.html
In the next update, you need to address the following issue:
setTimeout
and setInterval
functions should be called only with function expressions as their first argument.If you are passing a function which is not being correctly detected as such, please consider passing a closure or arrow function, which in turn calls the original function.http://screencast.com/t/E7t6EzHQp
As I understand this style with 80% width is used in several places.
Check that fixing this won't break layout in other places.
IMPORTANT: Check layout in FF, it often looks different from Chromium
Here is how it looks like:
http://screencast.com/t/0JYeEpmxoSHj
Use spritepad to compose all icons to one sprite:
http://wearekiss.com/spritepad
Don't forget about retina.
Replace "Apple" icon for AG for Mac links to this:
https://www.dropbox.com/s/99u8q9pukceh0k2/24.png?dl=0
https://www.dropbox.com/s/ppma3gdvpuyraiz/48.png?dl=0
Use old apple icon for links to Adguard iOS app.
Here's what AMO reviewer suggests:
For example { scriptSource: "remote", data: "..." }. In the applyScripts method, you could check the source and not inject if remote. When creating a script, you can set scriptSource once. A reviewer can then grep the code for scriptSource and determine that it is only set once and never changed. Does that sound like a plan? I realize doing this has no technical value, but it would help make reviews easier with the large code base.
Sounds like a good idea.
A note from AMO reviewer:
For your next release, please look into the following error, which shows up in the console multiple times:
chrome://adguard/content/log.html?tabId=4 : Unable to run script because scripts are blocked internally.
We can see what's blocked in console log. Thus we can reanimate the toolbar icon counter.
We should add custom sidebar Panel to chrome developer tools Elements panel.
Will be really handy for filters developers.
Chrome documentation:
https://developer.chrome.com/devtools
There is a problem in Firefox 38 ESR, referrer is null for EACH request there.
Also handle it in Filtering Log.
{".mp4", ContentType.Media},
{".flv", ContentType.Media},
{".avi", ContentType.Media},
{".m3u", ContentType.Media},
{".webm", ContentType.Media},
{".mpeg", ContentType.Media},
{".3gp", ContentType.Media},
{".3gpp", ContentType.Media},
{".3g2", ContentType.Media},
{".3gpp2", ContentType.Media},
{".ogg", ContentType.Media},
{".mov", ContentType.Media},
{".qt", ContentType.Media},
{".ttf", ContentType.Font},
{".otf", ContentType.Font},
{".woff", ContentType.Font},
{".woff2", ContentType.Font},
{".eot", ContentType.Font}
It's better to fix this asap, let's won't wait for other issues to be fixed.
Test page:
http://lenta.ru/news/2015/10/20/afghanistan/
Look at social widgets in the article footer.
By default these are blocked. But if you enable "collect filters stats" option they aren't.
We should register font as resource?
downloadable font: download not allowed (font-family: "gotham_proregular" style:normal weight:normal stretch:normal src index:2): bad URI or cross-site access not allowed source: chrome://adguard/content/skin/fonts/gothaproreg-webfont.ttf
http://forum.adguard.com/showthread.php?6839-Adguard-should-not-remove-element-s-origin-styles
Look at Adguard's content script and how elements are collapsed there.
The problem is that Adguard does not store previous "display" style so it may restore it wrong way.
We should change it to:
^https?://
Otherwise there is a risk of blocking urls like:
http://somedomain.com/..../http://blockeddomain.com/
We should test it.
Started since 2.0.12
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.