1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 17:32:25 +01:00

Replace dactyl.has(OS) with util.isOS.

This commit is contained in:
Doug Kearns
2010-10-17 23:22:53 +11:00
parent e8caf78170
commit d170fda0e3
7 changed files with 26 additions and 20 deletions

View File

@@ -526,6 +526,18 @@ const Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
*/
isDomainURL: function isDomainURL(url, domain) util.isSubdomain(util.getHost(url), domain),
/**
* Returns true if 'os' matches Dactyl's notion of the current operating
* system platform. This is one of "WINNT", "Darwin" or "Unix".
*
* @param {string} os The OS platform to test.
* @returns {boolean}
*/
isOS: function isOS(os) {
let OS = services.get("runtime").OS;
return (OS == "WINNT" || OS == "Darwin") ? os == OS : os == "Unix";
},
/**
* Returns true if 'host' is a subdomain of 'domain'.
*