Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions Marktplaats_Exchanger/292931.user.js

This file was deleted.

53 changes: 53 additions & 0 deletions Marktplaats_Exchanger/Marktplaats_Exchanger.user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// ==UserScript==
// @id Marktplaats_Exchanger@https://github.com/jerone/UserScripts
// @name Marktplaats Exchanger
// @namespace https://github.com/jerone/UserScripts
// @description Exchange Marktplaats.nl
// @author jerone
// @copyright 2015+, jerone (http://jeroenvanwarmerdam.nl)
// @license GNU GPLv3
// @homepage https://github.com/jerone/UserScripts/tree/master/Marktplaats_Exchanger#readme
// @homepageURL https://github.com/jerone/UserScripts/tree/master/Marktplaats_Exchanger#readme
// @downloadURL https://github.com/jerone/UserScripts/raw/master/Marktplaats_Exchanger/Marktplaats_Exchanger.user.js
// @updateURL https://github.com/jerone/UserScripts/raw/master/Marktplaats_Exchanger/Marktplaats_Exchanger.user.js
// @supportURL https://github.com/jerone/UserScripts/issues
// @contributionURL https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VCYMHWQ7ZMBKW
// @version 1.0.0
// @grant none
// @run-at document-end
// @include https://www.marktplaats.*
// ==/UserScript==

(function Marktplaats_Exchanger() {
var selectAll = document.getElementById("select-all-container");
if (!selectAll) {
return;
}

var button = document.createElement("div");
button.setAttribute("title", "Selecteer alle verkochte advertenties");
button.style.background = "transparent linear-gradient(to bottom, #FEFEFE 0%, #D9D9D9 100%) repeat scroll 0% 0%";
button.style.border = "1px solid #A1A1A1";
button.style.cssFloat = "left";
button.style.cursor = "default";
button.style.height = "30px";
button.style.marginRight = "5px";
button.style.padding = "0 8px";
selectAll.parentNode.insertBefore(button, selectAll.nextSibling);

var selectInput = document.createElement("input");
selectInput.setAttribute("type", "checkbox");
selectInput.addEventListener("change", function selectInputChange() {
var checked = selectInput.checked;
Array.prototype.forEach.call(document.querySelectorAll(".ad-listing"), function(row) {
var isRemoved = row.classList.contains("removed");
var checkbox = row.querySelector("input.kopen-select");
if (checkbox.checked !== (checked && isRemoved)) {
checkbox.click();
}
});
});
button.appendChild(selectInput);

button.appendChild(document.createTextNode(" Verkocht"));
})();
36 changes: 35 additions & 1 deletion Marktplaats_Exchanger/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,35 @@
[Marktplaats Exchanger](http://userscripts.org/scripts/show/292931)
# [Marktplaats Exchanger](https://github.com/jerone/UserScripts/tree/master/Marktplaats_Exchanger)

[![Install](https://raw.github.com/jerone/UserScripts/master/_resources/Install-button.png)](https://github.com/jerone/UserScripts/raw/master/Marktplaats_Exchanger/Marktplaats_Exchanger.user.js)
[![Source](https://raw.github.com/jerone/UserScripts/master/_resources/Source-button.png)](https://github.com/jerone/UserScripts/blob/master/Marktplaats_Exchanger/Marktplaats_Exchanger.user.js)
[![Donate](https://raw.github.com/jerone/UserScripts/master/_resources/Donate-button.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VCYMHWQ7ZMBKW)
[![Support](https://raw.github.com/jerone/UserScripts/master/_resources/Support-button.png)](https://github.com/jerone/UserScripts/issues)


## Description

Adds an extra checkbox on the "Mijn Favorieten" page to select all sold ads for easy removal.


## Screenshot

![Marktplaats Exchanger Screenshot](https://github.com/jerone/UserScripts/raw/master/Marktplaats_Exchanger/screenshot.jpg)


## Compatible

* [![](https://raw.github.com/jerone/UserScripts/master/_resources/Greasemonkey.png) Greasemonkey](https://addons.mozilla.org/firefox/addon/greasemonkey/) on [![](https://raw.github.com/jerone/UserScripts/master/_resources/Firefox.png) Mozilla Firefox](http://www.mozilla.org/en-US/firefox/fx/#desktop) desktop.

<sub>Please [notify](https://github.com/jerone/UserScripts/issues/new?title=Userscript%20%3Cname%3E%20%28%3Cversion%3E%29%20also%20works%20in%20%3Cbrowser%3E%20on%20%3Cdesktop/device%3E) when this userscript is successfully tested in another browser...</sub>


## Version History

* **1.0.0**
* Initial version;


## External links

* [Greasy Fork](https://greasyfork.org/scripts/Marktplaats_Exchanger)
* [OpenUserJS](https://openuserjs.org/scripts/jerone/Marktplaats_Exchanger)
Binary file added Marktplaats_Exchanger/screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.