Skip to content

Commit bbb498a

Browse files
committed
🎬 New version for Marktplaats Exchanger;
1 parent 50157ee commit bbb498a

File tree

4 files changed

+88
-42
lines changed

4 files changed

+88
-42
lines changed

Marktplaats_Exchanger/292931.user.js

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// ==UserScript==
2+
// @id Marktplaats_Exchanger@https://github.com/jerone/UserScripts
3+
// @name Marktplaats Exchanger
4+
// @namespace https://github.com/jerone/UserScripts
5+
// @description Exchange Marktplaats.nl
6+
// @author jerone
7+
// @copyright 2015+, jerone (http://jeroenvanwarmerdam.nl)
8+
// @license GNU GPLv3
9+
// @homepage https://github.com/jerone/UserScripts/tree/master/Marktplaats_Exchanger#readme
10+
// @homepageURL https://github.com/jerone/UserScripts/tree/master/Marktplaats_Exchanger#readme
11+
// @downloadURL https://github.com/jerone/UserScripts/raw/master/Marktplaats_Exchanger/Marktplaats_Exchanger.user.js
12+
// @updateURL https://github.com/jerone/UserScripts/raw/master/Marktplaats_Exchanger/Marktplaats_Exchanger.user.js
13+
// @supportURL https://github.com/jerone/UserScripts/issues
14+
// @contributionURL https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VCYMHWQ7ZMBKW
15+
// @version 1.0.0
16+
// @grant none
17+
// @run-at document-end
18+
// @include https://www.marktplaats.*
19+
// ==/UserScript==
20+
21+
(function Marktplaats_Exchanger() {
22+
var selectAll = document.getElementById("select-all-container");
23+
if (!selectAll) {
24+
return;
25+
}
26+
27+
var button = document.createElement("div");
28+
button.setAttribute("title", "Selecteer alle verkochte advertenties");
29+
button.style.background = "transparent linear-gradient(to bottom, #FEFEFE 0%, #D9D9D9 100%) repeat scroll 0% 0%";
30+
button.style.border = "1px solid #A1A1A1";
31+
button.style.cssFloat = "left";
32+
button.style.cursor = "default";
33+
button.style.height = "30px";
34+
button.style.marginRight = "5px";
35+
button.style.padding = "0 8px";
36+
selectAll.parentNode.insertBefore(button, selectAll.nextSibling);
37+
38+
var selectInput = document.createElement("input");
39+
selectInput.setAttribute("type", "checkbox");
40+
selectInput.addEventListener("change", function selectInputChange() {
41+
var checked = selectInput.checked;
42+
Array.prototype.forEach.call(document.querySelectorAll(".ad-listing"), function(row) {
43+
var isRemoved = row.classList.contains("removed");
44+
var checkbox = row.querySelector("input.kopen-select");
45+
if (checkbox.checked !== (checked && isRemoved)) {
46+
checkbox.click();
47+
}
48+
});
49+
});
50+
button.appendChild(selectInput);
51+
52+
button.appendChild(document.createTextNode(" Verkocht"));
53+
})();

Marktplaats_Exchanger/README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,35 @@
1-
[Marktplaats Exchanger](http://userscripts.org/scripts/show/292931)
1+
# [Marktplaats Exchanger](https://github.com/jerone/UserScripts/tree/master/Marktplaats_Exchanger)
2+
3+
[![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)
4+
[![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)
5+
[![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)
6+
[![Support](https://raw.github.com/jerone/UserScripts/master/_resources/Support-button.png)](https://github.com/jerone/UserScripts/issues)
7+
8+
9+
## Description
10+
11+
Adds an extra checkbox on the "Mijn Favorieten" page to select all sold ads for easy removal.
12+
13+
14+
## Screenshot
15+
16+
![Marktplaats Exchanger Screenshot](https://github.com/jerone/UserScripts/raw/master/Marktplaats_Exchanger/screenshot.jpg)
17+
18+
19+
## Compatible
20+
21+
* [![](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.
22+
23+
<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>
24+
25+
26+
## Version History
27+
28+
* **1.0.0**
29+
* Initial version;
30+
31+
32+
## External links
33+
34+
* [Greasy Fork](https://greasyfork.org/scripts/Marktplaats_Exchanger)
35+
* [OpenUserJS](https://openuserjs.org/scripts/jerone/Marktplaats_Exchanger)
149 KB
Loading

0 commit comments

Comments
 (0)