Review Request: Rewrite Google's tracking URLs in search results
Anders Lund
anders at alweb.dk
Sun Dec 23 14:44:58 GMT 2012
Søndag den 23. december 2012 14:34:59 skrev Thomas Fischer:
> > On Dec. 23, 2012, 12:57 p.m., Anders Lund wrote:
> > > Wouldn't it be better to improve the userscripts plugin for KHTML? I
> > > have auserscript that removes the google tracking URLS in khtml, and
> > > there are probably similar scripts eg for facebook and apart from that
> > > a lot of other usefull scripts in userscripts.org.
> > >
> > > I do not understand the rationale behind targeting one specific website
> > > this way! Just my 2c :)>
> > userscripts plugin for KHTML
>
> Do you mean this one here?
> http://kde-apps.org/content/show.php?content=140676
> It says it is no longer maintained. I will have a look ...
Yes, but it basically works as far as implemented. There are some fairly low
hanging fruits to pick, if someone wants to work on it.
> My code is fairly simple and more likely (I assume) to get accepted than a
> "large" solution like userscript.
> > rationale behind targeting one specific website this way
On the other hand userscripts by itself does not try to obstruct anyone in
particular, which is what targeting google of facebook with specific code to
alter their websites does. And websites can change their code at any time, in
which case the hardcoded solution breaks unfixable until a new release can be
made, whereas a javascript can be adjusted.
> It was my itch to scratch. Google is just the start.
> As I stated in the code as a TODO comment: more cases to add!
That is my point, you can never hit all the various cases. Userscripts have a
better chance with that, since there are quite a few more contributors ;)
Kindly,
Anders
>
> - Thomas
>
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107867/#review23899
> -----------------------------------------------------------
>
> On Dec. 23, 2012, 11:09 a.m., Thomas Fischer wrote:
> > -----------------------------------------------------------
> > This is an automatically generated e-mail. To reply, visit:
> > http://git.reviewboard.kde.org/r/107867/
> > -----------------------------------------------------------
> >
> > (Updated Dec. 23, 2012, 11:09 a.m.)
> >
> >
> > Review request for kdelibs.
> >
> >
> > Description
> > -------
> >
> > This patch adds the feature to KHTML to rewrite URLs that are used to
> > track users. Right now, only tracking URLs from Google's search result
> > are supported, but the list can be expanded (hard-coded right now).
> > Example: A search for "KDE" may result in a list of links, including a
> > link like
> > http://www.google.com/url?q=http://www.kde.org/&sa=U&ei=YsYFfgOqAZzBQBC&v
> > ed=GEFANYNoNG&usg=Y8BfN6qj0QYNHYJQQBEB When you follow this link, Google
> > will transparently redirect you to http://www.kde.org, but still record
> > your behaviour. The patch rewrites such links already in the HTML parsing
> > phase, i.e. you never see the tracking URL, but instead the final URL
> > only.
> >
> > The rewrite feature can be disabled through a setting, but there is no GUI
> > for that yet.
> >
> > I was thinking about automatically detecting tracking URLs through a
> > regular expression, but I guess running a regular expression check for
> > every URL would be too time-consuming.
> >
> > I wrote the patch for 4.9.3 as this is the version I am using on the
> > testing machine. I assume the affected classes haven't changed much in
> > recent months, so it should be fairly simple to port to HEAD or future
> > 4.11.
> >
> >
> > Diffs
> > -----
> >
> > khtml/khtml_settings.h 0faec6d
> > khtml/khtml_settings.cpp b5693b4
> > khtml/xml/dom_docimpl.cpp bb65a89
> >
> > Diff: http://git.reviewboard.kde.org/r/107867/diff/
> >
> >
> > Testing
> > -------
> >
> >
> > Thanks,
> >
> > Thomas Fischer
More information about the kde-core-devel
mailing list