This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var LinkGrabber = { | |
textarea: null, | |
/* Textarea Management */ | |
attach_ta: function(){ | |
if(LinkGrabber.textarea != null) return; | |
var textarea = LinkGrabber.textarea = document.createElement("textarea"); | |
textarea.setAttribute("style", "position: fixed; width: 100%; margin: 0; top: 0; bottom: 0; right: 0; left: 0; z-index: 99999999"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void) forceRedrawInWebView:(UIWebView*)webView { | |
NSArray *views = webView.scrollView.subviews; | |
for(int i = 0; i<views.count; i++){ | |
UIView *view = views[i]; | |
//if([NSStringFromClass([view class]) isEqualToString:@"UIWebBrowserView"]){ | |
[view setNeedsDisplayInRect:webView.bounds]; // Webkit Repaint, usually fast | |
[view setNeedsLayout]; // Webkit Relayout (slower than repaint) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getAllTextInColumn = function(rect){ | |
/* | |
rect should be the size and x,y of the column | |
*/ | |
if(document.caretPositionFromPoint){ | |
var caretRangeStart = document.caretPositionFromPoint(rect.left, rect.top); | |
var caretRangeEnd = document.caretPositionFromPoint(rect.left+rect.width-1, rect.top+rect.height-1); | |
} else if(document.caretRangeFromPoint){ | |
var caretRangeStart = document.caretRangeFromPoint(rect.left, rect.top); |
NewerOlder