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/main.js
2012-11-07 03:51:27 +01:00

68 lines
1.3 KiB
JavaScript

var tentia_instance;
var tentia_cache = {};
var OS_TYPE = "mac";
requirejs.config({
baseUrl: 'scripts'
});
function start(view) {
if (view == "oauth") {
require(["controller/Oauth"], function(Oauth) {
tentia_instance = new Oauth();
tentia_instance.authenticate();
});
} else if (view == "timeline") {
require(["controller/Timeline"], function(Timeline) {
tentia_instance = new Timeline();
});
} else if (view == "mentions") {
require(["controller/Mentions"], function(Mentions) {
tentia_instance = new Mentions();
});
} else if (view == "profile") {
} else if (view == "follow") {
} else if (view == "conversation") {
}
}
String.prototype.startsWith = function(prefix) {
return this.indexOf(prefix) === 0;
}
String.prototype.endsWith = function(suffix) {
return this.match(suffix+"$") == suffix;
};
function loadPlugin(url) {
var plugin = document.createElement("script");
plugin.type = "text/javascript";
plugin.src = url;
document.getElementsByTagName("head")[0].appendChild(plugin);
}
function debug(string) {
if (typeof string != "string") {
string = JSON.stringify(string);
}
alert("DEBUG: " + string);
}
setTimeout(HostAppGo, 1000);