restructuring of the whole code basis
This commit is contained in:
parent
2efbbd1d0a
commit
d99ff86520
60 changed files with 14404 additions and 2490 deletions
51
WebKit/scripts/helper/HostApp.js
Normal file
51
WebKit/scripts/helper/HostApp.js
Normal file
|
@ -0,0 +1,51 @@
|
|||
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;
|
||||
|
||||
});
|
Reference in a new issue