summaryrefslogtreecommitdiff
path: root/UICaboodle
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-02-28 11:07:20 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-07 02:41:28 -0800
commitc81b955f549989da7fde104c6fbc462b5d6d4ec2 (patch)
treebb451b4a54c60fabef3e000a487951a123bdf67e /UICaboodle
parent449ef9d5e3846f1b4d517973eecb4c068fe276f9 (diff)
Filter out the more annoying console.log() messages.
Diffstat (limited to 'UICaboodle')
-rw-r--r--UICaboodle/BrowserView.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm
index 4484da3..7a35642 100644
--- a/UICaboodle/BrowserView.mm
+++ b/UICaboodle/BrowserView.mm
@@ -4,6 +4,7 @@
#include "UCPlatform.h"
#include <UICaboodle/BrowserView.h>
+#include "UICaboodle/PerlCompatibleRegEx.hpp"
#include <UICaboodle/UCLocalize.h>
//#include <QuartzCore/CALayer.h>
@@ -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
}