ARCHIVE

Aggiunge comandi al menu di Tampermonkey per accedere a versioni archiviate della pagina corrente

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         ARCHIVE
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Aggiunge comandi al menu di Tampermonkey per accedere a versioni archiviate della pagina corrente
// @author       SH3LL
// @match        *://*/*
// @grant        GM_registerMenuCommand
// @icon         https://i.postimg.cc/L8cP5JMV/icon.png
// ==/UserScript==

(function() {
    'use strict';

    // Open in Wayback Machine
    function openWaybackMachine() {
        const currentUrl = window.location.href;
        window.open('https://web.archive.org/web/*/' + currentUrl, '_blank');
    }

    // Open in Archive.is
    function openArchiveToday() {
        const currentUrl = window.location.href;
        window.open('https://archive.is/' + currentUrl, '_blank');
    }

    // Save in Wayback Machine
    function saveToWaybackMachine() {
        const currentUrl = window.location.href;
        window.open('https://web.archive.org/save/' + currentUrl, '_blank');
    }

    // Save in Archive.is
    function saveToArchiveToday() {
        const currentUrl = window.location.href;
        window.open('https://archive.is/?run=1&url=' + encodeURIComponent(currentUrl), '_blank');
    }

    // MENU
    GM_registerMenuCommand('[🔍️]-web.archive.org', openWaybackMachine);
    GM_registerMenuCommand('[🔍️]-archive.is', openArchiveToday);
    GM_registerMenuCommand('[💾]-web.archive.org', saveToWaybackMachine);
    GM_registerMenuCommand('[💾]-archive.is', saveToArchiveToday);
})();