unsanded / Marktplaats proper images

// ==UserScript==
// @name     Marktplaats proper images
// @description Just dump all images under description so they are not tiny
// @version  1
// @downloadURL 
// @grant    none
// @run-at       document-end
// @downloadURL https://openuserjs.org/install/unsanded/Marktplaats_proper_images.user.js
// @updateURL https://openuserjs.org/meta/unsanded/Marktplaats_proper_images.meta.js
// @include  https://*marktplaats.nl/v/*
// @copyright 2022, unsanded (https://openuserjs.org/users/unsanded)
// @license GPL-3.0-or-later
// ==/UserScript==

var desc = document.getElementsByClassName("Description-root")[0];

function addImg(src) {
  var newD = document.createElement('div');
  var newI = document.createElement('img');
  newI.src = src;
  newI.setAttribute("height", "100%");
  newI.setAttribute("width", "100%");
  newD.appendChild(newI);
  desc.appendChild(newD);
}

var imagesCopied = 0;

setTimeout(function () {

  var thumbs = document.getElementsByClassName('Thumbnails-item');

  for (i = imagesCopied; i < thumbs.length; i++) {
    addImg(
      thumbs[i].style.backgroundImage.replace("url(\"", "https:").replace("\")", "").replace("_14", "_86")
    );

  }

  imagesCopied = thumbs.length;
  return

  // old way. May be more relyable, but doesn't load all on load

  var imgs = document.getElementsByClassName("Carousel-image");
  for (var i = imagesCopied; i < imgs.length; i++) {
    var img = imgs[i];
    addImg(img.src);
  }
  imagesCopied = imgs.length;

}, 1000);