DioVayne
7/9/2015 - 5:55 PM

MarktplaatsCleaner.user.js

MarktplaatsCleaner.user.js

// ==UserScript==
// @name         Marktplaats Cleaner
// @namespace    http://diovayne.nl/
// @version      0.2
// @description  Remove commercial adverts on marktplaats
// @author       Dio Vayne
// @match        http://www.marktplaats.nl/*
// @grant        none
// ==/UserScript==

$('.location-name:contains("Bezorgt in"), .seller-link, .mp-listing-attributes:contains("Nieuw")').parents('article').addClass('dioHidden').hide();
$('.bottom-listing, #bottom-listings-divider, #banner-top, .horizontalRichSnippet').addClass('dioHidden').hide();

$('#header-column-left').append('<li><a class="dioShow">show shit</a></li><li><a class="dioHide">hide shit</a></li>');

$('.dioShow').click(function(){
	$('.dioHidden').show();
});
$('.dioHide').click(function(){
	$('.dioHidden').hide();
});

$('body').prepend('<div id="bigImg" style="position:fixed;left:0;top:0;max-width:100%;z-index:99999;display:none"></div>');
$('.listing-image > img').bind('contextmenu',function(){
	var vT = $(this);
	var vImg = vT.attr('src');
	var vBigImg = vImg.replace('$_82.JPG','$_85.JPG');
	$('#bigImg').find('img').remove();
	$('#bigImg').prepend('<img src="'+vBigImg+'" />').fadeIn(function(){
		$(this).bind('click mouseleave',function(){
			$(this).find('img').remove();
		})
	});;
	return false;
});