WaybackMachine - Image preView on Archive.org pages

Provide archived images preview by replace all tags <a> with tags <img> in each archived images links

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         WaybackMachine - Image preView on Archive.org pages
// @description  Provide archived images preview by replace all tags <a> with tags <img> in each archived images links
// @icon         https://greasyfork.s3.us-east-2.amazonaws.com/a18s9s6zkhpm0wrcvl3703zr0mel
// @version      1.3.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);
//result = text.slice(-3);
function delinkImage (jNode) {
    var imgUrl2 = jNode.attr ("href");
    var imgUrl3 = imgUrl2.replace("*/","/");
    var imgUrl = imgUrl3.replace("/1500w/","/1500/");
      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: 50vw; };" );