Convert to Unix linebreaks
This commit is contained in:
parent
c4750a47b2
commit
c6ab6ab169
13
storage.js
13
storage.js
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user