Change <a>-tag to <img> in each img link
As of
// ==UserScript==
// @name Wayback Machine - Image preView
// @description Change <a>-tag to <img> in each img link
// @icon https://play-lh.googleusercontent.com/hJnWYDQLRKqXZS7siQe-HeHZfcEFQ-cPS6cMNAKA4ukC5IwHgKHjQR8nWC9AUS-0kO-9
// @version 1.3
// @author Ravlissimo
// @match https://web.archive.org/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// @require https://update.greasyfork.org/scripts/488748/1336185/waitForKeyElements2.js
// @grant GM_addStyle
// @license MIT
// @namespace https://greasyfork.org/users/921216
// ==/UserScript==
var imgExtRegex = new RegExp('.*\.(gif|png|jpg|jpeg|webp|webm)$', 'im');
var waitForKeyElements;
waitForKeyElements ("tr > td > a", delinkImage);
function delinkImage (jNode) {
var imgUrl2 = jNode.attr ("href");
var imgUrl = imgUrl2.replace("*/","/");
if (imgExtRegex.test (imgUrl) ) {
//-- Found an image link. Replace contents.
jNode.html ('<img src="' + imgUrl + '" class="gmDeLinked" alt="GM replaced image">');
}
}
GM_addStyle ( "img.gmDeLinked { border: 1px solid lime; max-width: 70vw; };" );