From cfc08167cf9acde092a020ed313e25201e2a9695 Mon Sep 17 00:00:00 2001 From: Sam Bingner Date: Fri, 25 Oct 2019 14:03:20 -1000 Subject: Temporary hack to make buttons work --- CyteKit/WebViewController.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm index 0394834..e32dfb5 100644 --- a/CyteKit/WebViewController.mm +++ b/CyteKit/WebViewController.mm @@ -798,6 +798,9 @@ static _H Diversions_; } - (NSURLRequest *) webView:(WebView *)view resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source { + if ([request.URL.absoluteString isEqualToString:@"https://cydia.saurik.com/fastclick/lib/fastclick.js"]) { + ((NSMutableURLRequest*)request).URL = [NSURL URLWithString:@"file:///var/null"]; + } #if LogBrowser NSLog(@"resource:%@ willSendRequest:%@ redirectResponse:%@ fromDataSource:%@", identifier, request, response, source); #endif @@ -806,6 +809,9 @@ static _H Diversions_; } - (NSURLRequest *) webThreadWebView:(WebView *)view resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source { + if ([request.URL.absoluteString isEqualToString:@"https://cydia.saurik.com/fastclick/lib/fastclick.js"]) { + ((NSMutableURLRequest*)request).URL = [NSURL URLWithString:@"file:///var/null"]; + } #if LogBrowser NSLog(@"resource:%@ willSendRequest:%@ redirectResponse:%@ fromDataSource:%@", identifier, request, response, source); #endif -- cgit v1.2.3