Merge pull request #99 from tophf/ignore-port-in-domain

Ignore port number in url domain
This commit is contained in:
Jason Barnabe 2015-04-07 11:02:36 -05:00
commit b31ac3e8b6

View File

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