Discussions » Creation Requests

Remove adds from search result marktplaats.nl

§
Posted: 2014-11-25
Edited: 2014-11-25

Remove adds from search result marktplaats.nl

Until shortly an old script http://userscripts-mirror.org/scripts/show/152960 worked perfect.
Below is the one I found here after the changes on the marktplaats.nl site
https://greasyfork.org/nl/scripts/2132-marktplaats-opschoner

But this one is not working completely, images of the hidden rows are still visible
Is it possible to hide those complete rows again?
The first cells "articles" are the one with payed adds and recognizable with website, text: topadvertentie or dagtopper

Example search
http://www.marktplaats.nl/z.html?query=boek&searchOnTitleAndDescription=true&categoryId=0&postcode=&distance=0

§
Posted: 2014-11-28

Hmm, this looks familiar. ;-)

Each row has this structure:

<article class="row search-result defaultSnippet group-1"> (or group-0)
    <figure class="cell column-thumb ">
    <div class="cell-group listing">

The script is removing the <div> but not the <article>.

Currently, the code reaches upward in the DOM like this:

// Remove 'Topadvertenties' (by pettenstein)
$("span.mp-listing-priority-product:contains('Topadvertentie')").parent().parent().remove();

It could be made more reliable by searching upward for the article tag, but this iteration may slow it down, so the immediate hack is to add one more parent() into the existing code:

// Remove 'Topadvertenties' (by pettenstein)
$("span.mp-listing-priority-product:contains('Topadvertentie')").parent().parent().parent().remove();

(and so forth)

§
Posted: 2015-05-29

Did just that in the latest iteration (version 1.10). Should work now, tested on win7 and Ubuntu Linux 12.04 with Firefox 38.0

Post reply

Sign in to post a reply.