This repository has been archived on 2025-08-18. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Bungloo/WebKit/scripts/helper/HostApp.js
2012-11-07 03:51:27 +01:00

51 lines
No EOL
1.1 KiB
JavaScript

define(function() {
var HostApp = {};
HostApp.setStringForKey = function(string, key) {
if (OS_TYPE == "mac") {
controller.setString_forKey_(string, key);
} else {
controller.setStringForKey(string, key);
}
}
HostApp.stringForKey = function(key) {
if (OS_TYPE == "mac") {
return controller.stringForKey_(key);
} else {
return controller.stringForKey(key);
}
}
HostApp.openURL = function(url) {
if (OS_TYPE == "mac") {
controller.openURL_(url);
} else {
controller.openURL(URL);
}
}
HostApp.loggedIn = function() {
controller.loggedIn();
}
HostApp.logout = function() {
if (OS_TYPE == "mac") {
controller.logout_(self);
} else {
controller.logout(self);
}
}
HostApp.unreadMentions = function(i) {
if (OS_TYPE == "mac") {
controller.unreadMentions_(i);
} else {
controller.unreadMentions(i);
}
}
return HostApp;
});