delete spaces and tabs on line ends
This commit is contained in:
parent
f7240ea2e5
commit
8d89461be7
28 changed files with 222 additions and 222 deletions
|
@ -16,13 +16,13 @@
|
|||
- (void)webView:(WebView *)sender addMessageToConsole:(NSDictionary *)message;{
|
||||
|
||||
if (![message isKindOfClass:[NSDictionary class]]) return;
|
||||
|
||||
|
||||
NSString *viewName = @"TimelineView";
|
||||
if (sender == mentionsView) viewName = @"MentionsView";
|
||||
if (sender == conversationView) viewName = @"ConversationView";
|
||||
if (sender == oauthView) viewName = @"OauthView";
|
||||
if (sender == profileView) viewName = @"ProfileView";
|
||||
|
||||
|
||||
NSLog(@"js<%@>: %@:%@: %@",
|
||||
viewName,
|
||||
[[message objectForKey:@"sourceURL"] lastPathComponent],
|
||||
|
@ -46,7 +46,7 @@
|
|||
NSLocalizedString(@"OK", @""), // default button
|
||||
NSLocalizedString(@"Cancel", @""), // alt button
|
||||
nil);
|
||||
return NSAlertDefaultReturn == result;
|
||||
return NSAlertDefaultReturn == result;
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
@ -56,45 +56,45 @@
|
|||
}
|
||||
|
||||
- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame {
|
||||
|
||||
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSString *pathToJsPlugin = [@"~/Library/Application Support/bungloo/Plugin.js" stringByExpandingTildeInPath];
|
||||
NSString *pathToCssPlugin = [@"~/Library/Application Support/bungloo/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) {
|
||||
|
||||
|
||||
[oauthView stringByEvaluatingJavaScriptFromString:@"function HostAppGo() { start('oauth') }"];
|
||||
|
||||
} else if(sender == conversationView) {
|
||||
|
||||
|
||||
[conversationView stringByEvaluatingJavaScriptFromString:@"function HostAppGo() { start('conversation') }"];
|
||||
|
||||
|
||||
} else if(sender == profileView) {
|
||||
|
||||
|
||||
[profileView stringByEvaluatingJavaScriptFromString:@"function HostAppGo() { start('profile') }"];
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
NSString *action = @"timeline";
|
||||
NSString *delay = @"1";
|
||||
|
||||
|
||||
if (sender == mentionsView) {
|
||||
action = @"mentions";
|
||||
delay = @"1000";
|
||||
}
|
||||
|
||||
|
||||
[sender stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"function HostAppGo() { start('%@') }", action]];
|
||||
}
|
||||
}
|
||||
|
@ -104,7 +104,7 @@
|
|||
// FIXME
|
||||
/*
|
||||
NSMutableArray *menuItems = [NSMutableArray arrayWithArray:defaultMenuItems];
|
||||
|
||||
|
||||
for (NSMenuItem*item in defaultMenuItems) {
|
||||
if ([[item title] isEqualToString:@"Reload"]) {
|
||||
//[item setAction:@selector(reload:)];
|
||||
|
@ -113,7 +113,7 @@
|
|||
[menuItems addObject:item];
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
return defaultMenuItems;
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@
|
|||
{
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSString *pathToPlugin = [@"~/Library/Application Support/Bungloo/Plugin.js" stringByExpandingTildeInPath];
|
||||
|
||||
|
||||
if([fileManager fileExistsAtPath:pathToPlugin])
|
||||
{
|
||||
return [NSString stringWithFormat:@"%@", [NSURL fileURLWithPath:pathToPlugin]];
|
||||
|
|
Reference in a new issue