Changeset 956
- Timestamp:
- 2008-04-26 15:31:17 (7 months ago)
- Files:
-
- sandbox/serverswitcher/chrome/content/functions.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/serverswitcher/chrome/content/functions.js
r953 r956 40 40 throw Exception("< 1.9"); 41 41 } 42 let eTLDsvc = Serv('@mozilla.org/network/effective-tld-service;1', 'nsIEffectiveTLDService');42 let eTLDsvc = Cc['@mozilla.org/network/effective-tld-service;1'].getService(Ci.nsIEffectiveTLDService); 43 43 SSW_getBaseDomain = function(uri) { 44 if (/^\d+\.\d+\.\d+\.\d+$/.test(uri.host)) { 44 try { 45 return eTLDsvc.getBaseDomain(uri); 46 } 47 catch (ex) { 45 48 return uri.host; 46 49 } 47 return eTLDsvc.getBaseDomain(uri);48 50 } 49 51 }
