Web Archive Save Link

Adds a save button to web archive pages.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @icon         http://web.archive.org/favicon.ico
// @name         Web Archive Save Link
// @version      2.0.0
// @description  Adds a save button to web archive pages.
// @author       Benji Grant
// @license      MIT
// @match        https://web.archive.org/web/*
// @match        http://web.archive.org/web/*
// @grant        none
// @namespace    https://greasyfork.org/users/4072
// ==/UserScript==

document.body.addEventListener('load', () => {
  const pageURL = window.location.pathname.replace(/\/web\/\d+\//, '')

  const saveLink = document.createElement('a')
  saveLink.href = `https://web.archive.org/save/${encodeURIComponent(pageURL)}`
  saveLink.style.fontFamily = 'sans-serif'
  saveLink.style.fontSize = '14px'
  saveLink.style.color = 'initial'
  saveLink.style.display = 'inline-block'
  saveLink.style.background = 'rgba(255,255,255,0.9)'
  saveLink.style.border = '5px solid black'
  saveLink.style.borderTop = '0'
  saveLink.style.borderRadius = '0 0 8px 8px'
  saveLink.style.boxShadow = '1px 1px 4px #333'
  saveLink.style.position = 'fixed'
  saveLink.style.top = '65px'
  saveLink.style.left = '25px'
  saveLink.style.padding = '8px 12px'
  saveLink.style.zIndex = '10000000000'
  saveLink.style.textDecoration = 'underline'
  saveLink.append(document.createTextNode('Save URL'))

  document.querySelector('#wm-ipp-base').after(saveLink)
})