added add/show geolocation and changed name from TweetModel to PostModel
This commit is contained in:
parent
d39b643844
commit
76b63d5c68
12 changed files with 398 additions and 50 deletions
|
@ -56,6 +56,20 @@
|
|||
|
||||
- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame {
|
||||
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSString *pathToJsPlugin = [@"~/Library/Application Support/Tentia/Plugin.js" stringByExpandingTildeInPath];
|
||||
NSString *pathToCssPlugin = [@"~/Library/Application Support/Tentia/Plugin.css" stringByExpandingTildeInPath];
|
||||
|
||||
if([fileManager fileExistsAtPath:pathToCssPlugin])
|
||||
{
|
||||
[sender stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"setTimeout(function() { loadCssPlugin('file://localhost%@') }, 1000);", pathToCssPlugin]];
|
||||
}
|
||||
|
||||
if([fileManager fileExistsAtPath:pathToJsPlugin])
|
||||
{
|
||||
[sender stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"setTimeout(function() { loadJsPlugin('file://localhost%@') }, 1000);", pathToJsPlugin]];
|
||||
}
|
||||
|
||||
[sender stringByEvaluatingJavaScriptFromString:@"var OS_TYPE = 'mac';"];
|
||||
|
||||
if (sender == oauthView) {
|
||||
|
@ -96,4 +110,16 @@
|
|||
[mentionsView stringByEvaluatingJavaScriptFromString:@"tentia_instance.getNewData();"];
|
||||
}
|
||||
|
||||
- (NSString *)pluginURL
|
||||
{
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSString *pathToPlugin = [@"~/Library/Application Support/Tentia/Plugin.js" stringByExpandingTildeInPath];
|
||||
|
||||
if([fileManager fileExistsAtPath:pathToPlugin])
|
||||
{
|
||||
return [NSString stringWithFormat:@"%@", [NSURL fileURLWithPath:pathToPlugin]];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Reference in a new issue