mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Fixing bug around training stories with a newline in the title.
This commit is contained in:
parent
ec5a93ba56
commit
a16813648d
3 changed files with 12 additions and 4 deletions
|
@ -818,6 +818,7 @@ shouldStartLoadWithRequest:(NSURLRequest *)request
|
||||||
action = [NSString stringWithFormat:@"%@", [urlComponents objectAtIndex:1]];
|
action = [NSString stringWithFormat:@"%@", [urlComponents objectAtIndex:1]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NSLog(@"Tapped url: %@", url);
|
||||||
// HACK: Using ios.newsblur.com to intercept the javascript share, reply, and edit events.
|
// HACK: Using ios.newsblur.com to intercept the javascript share, reply, and edit events.
|
||||||
// the pathComponents do not work correctly unless it is a correctly formed url
|
// the pathComponents do not work correctly unless it is a correctly formed url
|
||||||
// Is there a better way? Someone show me the light
|
// Is there a better way? Someone show me the light
|
||||||
|
@ -1289,6 +1290,7 @@ shouldStartLoadWithRequest:(NSURLRequest *)request
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)toggleTagClassifier:(NSString *)tag {
|
- (void)toggleTagClassifier:(NSString *)tag {
|
||||||
|
NSLog(@"toggleTagClassifier: %@", tag);
|
||||||
NSString *feedId = [NSString stringWithFormat:@"%@", [appDelegate.activeStory
|
NSString *feedId = [NSString stringWithFormat:@"%@", [appDelegate.activeStory
|
||||||
objectForKey:@"story_feed_id"]];
|
objectForKey:@"story_feed_id"]];
|
||||||
int tagScore = [[[[appDelegate.activeClassifiers objectForKey:feedId]
|
int tagScore = [[[[appDelegate.activeClassifiers objectForKey:feedId]
|
||||||
|
@ -1335,9 +1337,11 @@ shouldStartLoadWithRequest:(NSURLRequest *)request
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)refreshHeader {
|
- (void)refreshHeader {
|
||||||
NSString *headerString = [[self getHeader] stringByReplacingOccurrencesOfString:@"\'" withString:@"\\'"];
|
NSString *headerString = [[[self getHeader] stringByReplacingOccurrencesOfString:@"\'" withString:@"\\'"]
|
||||||
|
stringByReplacingOccurrencesOfString:@"\n" withString:@" "];
|
||||||
NSString *jsString = [NSString stringWithFormat:@"document.getElementById('NB-header-container').innerHTML = '%@';",
|
NSString *jsString = [NSString stringWithFormat:@"document.getElementById('NB-header-container').innerHTML = '%@';",
|
||||||
headerString];
|
headerString];
|
||||||
|
|
||||||
[self.webView stringByEvaluatingJavaScriptFromString:jsString];
|
[self.webView stringByEvaluatingJavaScriptFromString:jsString];
|
||||||
|
|
||||||
[self.webView stringByEvaluatingJavaScriptFromString:@"attachFastClick();"];
|
[self.webView stringByEvaluatingJavaScriptFromString:@"attachFastClick();"];
|
||||||
|
|
Binary file not shown.
|
@ -96,7 +96,11 @@ function findPos(obj) {
|
||||||
|
|
||||||
function NoClickDelay(el) {
|
function NoClickDelay(el) {
|
||||||
this.element = typeof el == 'object' ? el : document.getElementById(el);
|
this.element = typeof el == 'object' ? el : document.getElementById(el);
|
||||||
if( window.Touch ) this.element.addEventListener('touchstart', this, false);
|
if( window.Touch ) {
|
||||||
|
this.element.removeEventListener('touchstart', this.element.notouch, false);
|
||||||
|
this.element.notouch = this;
|
||||||
|
this.element.addEventListener('touchstart', this.element.notouch, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
NoClickDelay.prototype = {
|
NoClickDelay.prototype = {
|
||||||
handleEvent: function(e) {
|
handleEvent: function(e) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue