Linux compatibility fixes

This commit is contained in:
Jeena Paradies 2012-11-16 20:17:05 +01:00
parent 9e83bfec47
commit 80bf6388c9
4 changed files with 5 additions and 3 deletions

View file

@ -46,6 +46,8 @@
- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame {
[sender stringByEvaluatingJavaScriptFromString:@"var OS_TYPE = 'mac';"];
if (sender == oauthView) {
[oauthView stringByEvaluatingJavaScriptFromString:@"function HostAppGo() { start('oauth') }"];

View file

@ -5,7 +5,6 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="css/default.css" type="text/css" />
<script data-main="scripts/main" src="scripts/lib/vendor/require-jquery.js"></script>
<script type="text/javascript">alert(go)</script>
</head>
<body>
</body>

View file

@ -52,6 +52,7 @@ function(HostApp, Paths, Hmac) {
var those = this;
Paths.findProfileURL(entity,
function(profile_url) {
if (profile_url && (profile_url.startsWith("http://") || profile_url.startsWith("https://"))) {
those.register(profile_url);
} else {
@ -92,7 +93,7 @@ function(HostApp, Paths, Hmac) {
this.state = Hmac.makeid(19);
var auth = "/oauth/authorize?client_id=" + register_data["id"]
+ "&redirect_uri=" + escape(this.app_info["redirect_uris"][0])
+ "&redirect_uri=" + this.app_info["redirect_uris"][0] // Check if this still works on mac
+ "&scope=" + Object.keys(this.app_info["scopes"]).join(",")
+ "&state=" + this.state
+ "&tent_post_types=all";

View file

@ -25,7 +25,7 @@ define(function() {
if (OS_TYPE == "mac") {
controller.openURL_(url);
} else {
controller.openURL(URL);
controller.openURL(url);
}
}