Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: adblock-android-webview/src/org/adblockplus/libadblockplus/android/webview/AdblockWebView.java

Issue 29920555: Issue 6971 - Update regular expressions for resource type detection (Closed)
Patch Set: Created Oct. 23, 2018, 11:03 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « adblock-android-webview/build.gradle ('k') | adblock-android-webviewapp/build.gradle » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 protected static final String HEADER_REQUESTED_WITH = "X-Requested-With"; 82 protected static final String HEADER_REQUESTED_WITH = "X-Requested-With";
83 protected static final String HEADER_REQUESTED_WITH_XMLHTTPREQUEST = "XMLHttpR equest"; 83 protected static final String HEADER_REQUESTED_WITH_XMLHTTPREQUEST = "XMLHttpR equest";
84 84
85 private static final String BRIDGE_TOKEN = "{{BRIDGE}}"; 85 private static final String BRIDGE_TOKEN = "{{BRIDGE}}";
86 private static final String DEBUG_TOKEN = "{{DEBUG}}"; 86 private static final String DEBUG_TOKEN = "{{DEBUG}}";
87 private static final String HIDE_TOKEN = "{{HIDE}}"; 87 private static final String HIDE_TOKEN = "{{HIDE}}";
88 private static final String BRIDGE = "jsBridge"; 88 private static final String BRIDGE = "jsBridge";
89 private static final String[] EMPTY_ARRAY = {}; 89 private static final String[] EMPTY_ARRAY = {};
90 private static final String EMPTY_ELEMHIDE_ARRAY_STRING = "[]"; 90 private static final String EMPTY_ELEMHIDE_ARRAY_STRING = "[]";
91 91
92 private static final Pattern RE_JS = Pattern.compile("\\.js$", Pattern.CASE_IN SENSITIVE); 92 private static final Pattern RE_JS = Pattern.compile("\\.js(?:\\?.+)?", Patter n.CASE_INSENSITIVE);
93 private static final Pattern RE_CSS = Pattern.compile("\\.css$", Pattern.CASE_ INSENSITIVE); 93 private static final Pattern RE_CSS = Pattern.compile("\\.css(?:\\?.+)?", Patt ern.CASE_INSENSITIVE);
94 private static final Pattern RE_IMAGE = Pattern.compile("\\.(?:gif|png|jpe?g|b mp|ico)$", Pattern.CASE_INSENSITIVE); 94 private static final Pattern RE_IMAGE = Pattern.compile("\\.(?:gif|png|jpe?g|b mp|ico)(?:\\?.+)?", Pattern.CASE_INSENSITIVE);
95 private static final Pattern RE_FONT = Pattern.compile("\\.(?:ttf|woff)$", Pat tern.CASE_INSENSITIVE); 95 private static final Pattern RE_FONT = Pattern.compile("\\.(?:ttf|woff)(?:\\?. +)?", Pattern.CASE_INSENSITIVE);
96 private static final Pattern RE_HTML = Pattern.compile("\\.html?$", Pattern.CA SE_INSENSITIVE); 96 private static final Pattern RE_HTML = Pattern.compile("\\.html?(?:\\?.+)?", P attern.CASE_INSENSITIVE);
97 97
98 private volatile boolean addDomListener = true; 98 private volatile boolean addDomListener = true;
99 private boolean adblockEnabled = true; 99 private boolean adblockEnabled = true;
100 private boolean debugMode; 100 private boolean debugMode;
101 private AdblockEngineProvider provider; 101 private AdblockEngineProvider provider;
102 private Integer loadError; 102 private Integer loadError;
103 private int allowDrawDelay = ALLOW_DRAW_DELAY; 103 private int allowDrawDelay = ALLOW_DRAW_DELAY;
104 private WebChromeClient extWebChromeClient; 104 private WebChromeClient extWebChromeClient;
105 private WebViewClient extWebViewClient; 105 private WebViewClient extWebViewClient;
106 private WebViewClient intWebViewClient; 106 private WebViewClient intWebViewClient;
(...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after
1456 w("Busy with elemhide selectors, delayed disposing scheduled"); 1456 w("Busy with elemhide selectors, delayed disposing scheduled");
1457 elemHideThread.setFinishedRunnable(disposeRunnable); 1457 elemHideThread.setFinishedRunnable(disposeRunnable);
1458 } 1458 }
1459 else 1459 else
1460 { 1460 {
1461 disposeRunnable.run(); 1461 disposeRunnable.run();
1462 } 1462 }
1463 } 1463 }
1464 } 1464 }
1465 } 1465 }
OLDNEW
« no previous file with comments | « adblock-android-webview/build.gradle ('k') | adblock-android-webviewapp/build.gradle » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld