summaryrefslogtreecommitdiff
path: root/CyteKit
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2019-10-25 14:03:20 -1000
committerSam Bingner <sam@bingner.com>2020-04-08 13:56:09 -1000
commitcfc08167cf9acde092a020ed313e25201e2a9695 (patch)
tree4f17d8ac6303ddf1091115281d0ab824f4efec33 /CyteKit
parentfff2b9fefdbbcc65630fbc726e6d960de4f3b6d1 (diff)
Temporary hack to make buttons work
Diffstat (limited to 'CyteKit')
-rw-r--r--CyteKit/WebViewController.mm6
1 files changed, 6 insertions, 0 deletions
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<NSMutableSet> 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<NSMutableSet> 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