Convert to Unix linebreaks

This commit is contained in:
Jason Barnabe 2015-01-30 11:07:24 -06:00
parent c4750a47b2
commit c6ab6ab169

View File

@ -111,3 +111,16 @@ function reportError() {
}
}
}
function getDomains(url) {
if (url.indexOf("file:") == 0) {
return [];
}
var d = /.*?:\/*([^\/]+)/.exec(url)[1];
var domains = [d];
while (d.indexOf(".") != -1) {
d = d.substring(d.indexOf(".") + 1);
domains.push(d);
}
return domains;
}