From c81b955f549989da7fde104c6fbc462b5d6d4ec2 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 28 Feb 2011 11:07:20 -0800 Subject: [PATCH] Filter out the more annoying console.log() messages. --- UICaboodle/BrowserView.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm index 4484da37..7a356428 100644 --- a/UICaboodle/BrowserView.mm +++ b/UICaboodle/BrowserView.mm @@ -4,6 +4,7 @@ #include "UCPlatform.h" #include +#include "UICaboodle/PerlCompatibleRegEx.hpp" #include //#include @@ -695,6 +696,11 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se // CYWebViewDelegate {{{ - (void) webView:(WebView *)view addMessageToConsole:(NSDictionary *)message { #if LogMessages + static Pcre irritating("^(?:The page at .* displayed insecure content from .*\\.|Unsafe JavaScript attempt to access frame with URL .* from frame with URL .*\\. Domains, protocols and ports must match\\.)\\n$"); + if (NSString *data = [message objectForKey:@"message"]) + if (irritating(data)) + return; + NSLog(@"addMessageToConsole:%@", message); #endif } -- 2.45.2