Latest version and MOTD in osx launcher.

This commit is contained in:
Paul Chote
2010-12-23 12:47:26 +13:00
parent 14ad5099a0
commit fcdb3b536d
4 changed files with 33 additions and 26 deletions

View File

@@ -44,6 +44,7 @@ static JSBridge *SharedInstance;
@"log", NSStringFromSelector(@selector(log:)),
@"existsInMod", NSStringFromSelector(@selector(fileExists:inMod:)),
@"metadata", NSStringFromSelector(@selector(metadata:forMod:)),
@"httpRequest", NSStringFromSelector(@selector(httpRequest:)),
// File downloading
@"registerDownload", NSStringFromSelector(@selector(registerDownload:withURL:filename:)),
@@ -232,4 +233,12 @@ static JSBridge *SharedInstance;
return @"";
}
- (NSString *)httpRequest:(NSString *)url
{
NSLog(@"Requesting url %@",url);
NSString *response = [NSString stringWithContentsOfURL:[NSURL URLWithString:url] encoding:NSASCIIStringEncoding error:NULL];
NSLog(@"Response %@",response);
return response;
}
@end