web.archive.org查询

在web.archive.org的URLs中查询当前网址,因为部分网址有一些个性化后缀,比如b站的vd_source

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

You will need to install an extension such as Tampermonkey to install this script.

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         web.archive.org查询
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  在web.archive.org的URLs中查询当前网址,因为部分网址有一些个性化后缀,比如b站的vd_source
// @author       You
// @match        https://www.bilibili.com/video/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=bilibili.com
// @grant        none
// @license      GPL-3.0 License
// ==/UserScript==

setTimeout(add_button, 2000);

function add_button() {
	'use strict';
	add_container();

	var button1 = document.createElement("button");
	button1.textContent = "web.archive.org_urls";
	button1.style.display = "block";
	button1.style.fontSize = "1rem";
	button1.title = ""

	button1.onclick = function () {
		window.open('https://web.archive.org/web/*/'+location.href+'*');
		return;
	};
	background_color(button1);

	///////////

	var contain_ = document.querySelector("#container")
	contain_.appendChild(button1);
}

function add_container() {
	let Container = document.createElement('div');
	Container.id = "container";
	Container.style.position = "fixed";
	Container.style.right = "150px";
	Container.style.top = "300px";
	document.body.appendChild(Container);
}

function background_color(button) {
	button.onmouseover = function () {
		this.style.backgroundColor = 'cyan';
	};
	button.onmouseout = function () {
		this.style.backgroundColor = 'transparent';
	};
}