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:
@@ -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'.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user