Marktplaats Exchanger

Exchange Marktplaats.nl

  1. // ==UserScript==
  2. // @name Marktplaats Exchanger
  3. // @id Marktplaats_Exchanger@https://github.com/jerone/UserScripts
  4. // @namespace https://github.com/jerone/UserScripts
  5. // @description Exchange Marktplaats.nl
  6. // @author jerone
  7. // @copyright 2015+, jerone (https://github.com/jerone)
  8. // @license CC-BY-NC-SA-4.0; https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
  9. // @license GPL-3.0-or-later; http://www.gnu.org/licenses/gpl-3.0.txt
  10. // @homepage https://github.com/jerone/UserScripts/tree/master/Marktplaats_Exchanger#readme
  11. // @homepageURL https://github.com/jerone/UserScripts/tree/master/Marktplaats_Exchanger#readme
  12. // @supportURL https://github.com/jerone/UserScripts/issues
  13. // @contributionURL https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VCYMHWQ7ZMBKW
  14. // @version 1.0.1
  15. // @grant none
  16. // @run-at document-end
  17. // @include https://www.marktplaats.*
  18. // ==/UserScript==
  19.  
  20. // cSpell:ignore Roboto
  21.  
  22. (function Marktplaats_Exchanger() {
  23. var selectAll = document.getElementById("select-all-container");
  24. if (!selectAll) {
  25. return;
  26. }
  27.  
  28. var button = document.createElement("div");
  29. button.setAttribute("title", "Selecteer alle verkochte advertenties");
  30. button.style.background = "#F7F7F6";
  31. button.style.border = "1px solid #A1A1A1";
  32. button.style.cssFloat = "left";
  33. button.style.cursor = "default";
  34. button.style.height = "30px";
  35. button.style.marginRight = "5px";
  36. button.style.padding = "0 8px";
  37. button.style.fontFamily = "Roboto";
  38. selectAll.parentNode.insertBefore(button, selectAll.nextSibling);
  39.  
  40. var selectInput = document.createElement("input");
  41. selectInput.setAttribute("type", "checkbox");
  42. selectInput.addEventListener("change", function selectInputChange() {
  43. var checked = selectInput.checked;
  44. Array.prototype.forEach.call(
  45. document.querySelectorAll(".ad-listing"),
  46. function (row) {
  47. var isRemoved = row.classList.contains("removed");
  48. var checkbox = row.querySelector("input.kopen-select");
  49. if (checkbox.checked !== (checked && isRemoved)) {
  50. checkbox.click();
  51. }
  52. },
  53. );
  54. });
  55. button.appendChild(selectInput);
  56.  
  57. button.appendChild(document.createTextNode(" Verkocht"));
  58. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址