Voat Archive

Mirror links on archive.is for Voat submission links

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        Voat Archive
// @description Mirror links on archive.is for Voat submission links
// @namespace   https://voat.co/user/InsistentCooperative
// @match       *://*.voat.co/*
// @version     1.1
// @grant       none
// @license     MIT
// @license     WTFPL
// @license     Public Domain
// ==/UserScript==

for (let hold of document.querySelectorAll('.submission:not(.self) a.title[href]:not([href*="://archive.is/"]) ~ .domain')) {
  let orig = hold.parentNode.querySelector('a.title');
  let href = 'https://archive.is/?run=1&url=' + encodeURIComponent(orig.href); // from their bookmarklet
  hold.innerHTML += ' <span class="_gm_voat_archive">[<a href="' + href + '" class="_gm_voat_archive">archive</a>]</span>';
}