Skip to content

Instantly share code, notes, and snippets.

@azur256
Created April 1, 2012 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azur256/2274797 to your computer and use it in GitHub Desktop.
Save azur256/2274797 to your computer and use it in GitHub Desktop.
SIMBL Plugin for changing tweet template of Reeder V1.1.5
//
// NSResponder+ReederExtension.m
// Extention for Reeder 1.1.5
//
// Created by azur256 on 03/26/11.
// Copyright 2012 azur256. All rights reserved.
// Special thanks to moyashi (@hitoriblog), Kazuya Takeshima (@mitukiii)
//
#import "NSResponder+ReederExtension.h"
@implementation NSResponder(ReederExtension)
- (void)viewDidLoadExtention
{
NSString* blogTitle;
[self viewDidLoadExtention];
NSButton *button = [[[NSButton alloc] init] autorelease];
[[[[self textFieldCell:@"ServiceFormText"] input] NSView] addSubview:button];
[button setKeyEquivalent:@"\r"];
[button setKeyEquivalentModifierMask:NSCommandKeyMask];
[button setTarget:self];
[button setAction:@selector(submit:)];
[self performSelector:@selector(addText:) withObject:@" [SHARE] "];
[self performSelector:@selector(insertTitle:) withObject:nil];
blogTitle = [[self performSelector:@selector(data)] performSelector:@selector(srcTitle)];
if (blogTitle != nil) {
[self performSelector:@selector(addText:) withObject:@"|"];
[self performSelector:@selector(addText:) withObject:blogTitle];
} else {
NSLog(@"data is nil.");
}
[self performSelector:@selector(addText:) withObject:@"☞ "];
[self performSelector:@selector(insertLink:) withObject:nil];
return;
}
- (void)__didShortenLinkExtention:(id)arg1
{
[self __didShortenLinkExtention:arg1];
[[[self textFieldCell:@"ServiceFormText"] input] setSelectedRange:NSMakeRange(0, 0)];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment