Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pushing an URL to parseURI (AdReport Broken) #127

Merged
merged 2 commits into from
Feb 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions pages/adreport.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,17 +421,11 @@ function checkmalware() {
for (var i = 0; i < loaded_resources.length; i++) {
for (var key in loaded_resources[i]) {
// Push just domains, which are not already in extracted_domains array
if (SAFARI) {
var resource = key.split(":|:");
if (resource &&
resource.length === 2 &&
extracted_domains.indexOf(new parseURI(resource[1]).hostname) === -1) {
extracted_domains.push(new parseURI(resource[1]).hostname);
}
} else {
if (extracted_domains.indexOf(new parseURI(key).hostname) === -1) {
extracted_domains.push(new parseURI(key).hostname);
}
var resource = key.split(":|:");
if (resource &&
resource.length === 2 &&
extracted_domains.indexOf(new parseURI(resource[1]).hostname) === -1) {
extracted_domains.push(new parseURI(resource[1]).hostname);
}
}
}
Expand Down