Commit graph

115 commits

Author SHA1 Message Date
Alexander Butenko
a87b4cd7d8 Move adblock element hiding logic from JS to C 2011-12-18 02:07:55 +01:00
Alexander Butenko
98f2e3b572 Optimize private element hider algorithm 2011-12-07 20:34:54 +01:00
Alexander Butenko
312d321ff9 Skip window_object_cleared in non-http-frames 2011-12-07 20:30:42 +01:00
Alexander Butenko
de89a988f0 Do reset sig in adblock_is_matched_by_key 2011-11-29 01:32:31 +01:00
Christian Dywan
760270832a adblock_compile_regexp free data after checking it 2011-11-28 23:31:17 +01:00
Christian Dywan
ffd3026baf Clean up allocations in adblock_add_url_pattern 2011-11-28 21:21:29 +01:00
Alexander Butenko
249619a631 Avoid memory allocated sig in adblock_is_matched_by_key 2011-11-28 21:03:37 +01:00
Alexander Butenko
f8b6792756 Refactor adblock_is_matched_by_key into adblock_check_rule 2011-11-28 20:48:55 +01:00
Christian Dywan
da8983b09f Return in adblock filter entry should Add the filter 2011-11-22 21:57:20 +01:00
Alexander Butenko
179e33d054 Fix handling of blockss in Adblock 2011-11-09 22:06:10 +01:00
Alexander Butenko
fc2bac2e01 Append needed by Adblock correctly after blockcss 2011-11-08 22:22:01 +01:00
Christian Dywan
c5e6b7a020 Show mismatching build version suffix for extensions
MIDORI_VERSION_SUFFIX resolves to a string that needs to be
added to each extension's version at build time. If it is
different than the running Midori's, it is shown in the
extension list.
2011-11-08 01:53:53 +01:00
Christian Dywan
8fff7d8fd3 sokoke, gtk3-compat, gtkiconentry, stock join midori-platform.h
Also introduce #define MIDORI_MODULE_PREFIX.

Fixes: https://bugs.launchpad.net/midori/+bug/884395
2011-10-31 22:18:06 +01:00
Alexander Butenko
34e0c98cb7 Use midori_web_settings_add_style for adblock CSS 2011-10-30 15:19:06 +01:00
Christian Dywan
ff569e8328 Use Midori.URI API in adblock_resource_request_starting_cb 2011-10-29 03:32:16 +02:00
Christian Dywan
be04be8303 Introduce and use Midori.URI.is_http
Also make further uses of Midori.URI.parse.
2011-10-28 22:49:10 +02:00
Christian Dywan
4b33fd2c7d Avoid GTK+3 #ifdef and #define GTK_DIALOG_DESTROY_WITH_PARENT 2011-10-26 20:07:11 +02:00
Alexander Butenko
eeb4b7b391 Reduce strlen usage in adblock by using GString 2011-10-10 22:37:57 +02:00
Lucas Baudin
b5aad2d176 Allow building with GTK+3
Fixes: https://bugs.launchpad.net/midori/+bug/861351
2011-10-07 20:24:02 +02:00
Alexander Butenko
b574501978 No adblock on special pages 2011-09-14 01:59:57 +02:00
Paweł Forysiuk
b557233290 Don't bother with stock, res and favicons uris in adblock 2011-09-14 01:33:07 +02:00
Paweł Forysiuk
3e2e8906fb Remove leftover version guards for WebKit > 1.1.17 2011-08-15 22:56:38 +02:00
Alexander Butenko
ac78646f83 Don't do pattern matching if link was matched by key 2011-07-05 03:55:53 +02:00
Alexander Butenko
3db46d2297 Always check rules options, not only in pattern matching 2011-07-05 03:54:31 +02:00
Alexander Butenko
15a06bbfe1 Integrate Adblock preferences with extension list 2011-06-24 23:55:08 +02:00
Alexander Butenko
4d7424adc4 Fix length calculation and typos in fixup function 2011-06-24 21:48:03 +02:00
Alexander Butenko
60cb44c846 Remove legacy code from adblock 2011-06-24 21:42:32 +02:00
Alexander Butenko
bd10649982 Ignore rules with subdocument property 2011-06-24 21:26:05 +02:00
Alexander Butenko
f093e55f85 Skip empty lines in adblock rules files 2011-06-24 21:20:08 +02:00
Alexander Butenko
092834f65e Inline parsing functions. 10% speedup during load 2011-06-08 20:05:28 +02:00
Alexander Butenko
c71f3b37e4 Remove legacy webkit bug workaround 2011-06-08 20:03:37 +02:00
Paweł Forysiuk
f46f3f0be0 Speed-up JS generator function in Adblock 2011-06-08 20:02:48 +02:00
Alexander Butenko
5f1cd907ad Some tiny Adblock speed-ups with regex optimization 2011-06-08 19:59:18 +02:00
Alexander Butenko
4e656cc127 10x speed-up in loading of CSS rules for Adblock 2011-06-08 19:51:26 +02:00
Alexander Butenko
fc842d9751 Add URL cache in adblock extension
We can bypass all tests on the second load of the URL.
2011-06-02 00:48:02 +02:00
Christian Dywan
f97395dab1 Validate URIs and render entry red if invalid
Fixes: https://bugs.launchpad.net/midori/+bug/710855
2011-05-15 16:46:23 +02:00
Alexander Butenko
6885c35886 Fix loading of lists from https
Fixes: https://bugs.launchpad.net/midori/+bug/699978
2011-05-15 13:17:25 +02:00
Paweł Forysiuk
bbfa7f6030 Fix GCC 4.6 warnings about set but unused variables 2011-04-29 04:03:33 +02:00
Paweł Forysiuk
5cdbf5e814 Free uri in adblock_is_matched_by_key after printing 2011-02-13 18:35:46 +01:00
Christian Dywan
90e11d3713 Only no adblock if main frame in provisional state 2011-02-01 01:52:39 +01:00
Christian Dywan
2e35f1718b Never filter the main page itself with adblock
Fixes: https://bugs.launchpad.net/midori/+bug/706862
2011-01-30 19:25:50 +01:00
Christian Dywan
40dc38fd21 Implement and use KATZE_ARRAY_FOREACH_ITEM
Iterating an array by a GList is considerably faster than
continuously retrieving items, however it is also a lot
more complicated. So the new macro takes care of that and
uses a new semi-private function to avoid copying the list.

Note that the macro can't be nested, which basically isn't
useful in practise anyway.
2010-09-12 00:59:24 +02:00
Alexander Butenko
a04bf24b5e Properly disconnect add-tab on destruction in adblock 2010-06-30 22:41:32 +02:00
Alexander Butenko
3d972f11e4 Skip '+' sign in adblock rules 2010-06-30 21:09:55 +02:00
Alexander Butenko
633b7ed294 Inline functions in adblock for 0.5 percent speedup 2010-06-19 16:22:16 +02:00
Enrico Tröger
bab6124cff Guard debug variables in Adblock with G_ENABLE_DEBUG 2010-05-15 01:06:17 +02:00
Christian Dywan
779c582058 Guard WebKitDownload to WebKitGTK+ 1.1.2 2010-04-24 23:59:07 +02:00
Christian Dywan
efc5252048 Revise MIDORI_ADBLOCK so 1 is parsing and 2 is timing
Huge amounts of console output affect performance, so timing
should be taken separately.
2010-04-10 00:58:15 +02:00
Christian Dywan
63a5eeb0f0 Output adblock debug if variable MIDORI_ADBLOCK set
If Midori is compiled with full debug mode, and the environment
variable MIDORI_ADBLOCK is set, Adblock will output a lot of
debugging information.
This spares testers from editing code. grep is recommended.
2010-04-08 21:39:05 +02:00
Christian Dywan
95358acc82 Handle https:// URIs in Adblock properly
We mark URIs as 'disabled' by replacing the : with a -. This
fails if there is an https:// URI and we want to restore it.

For clarity, the macros ADBLOCK_FILTER_SET and
ADBLOCK_FILTER_IS_SET are introduced to handle the details.
2010-04-06 02:41:29 +02:00