Instagram Downloader

Instagram Media Downloader For Web Version

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Advertisement:

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

Advertisement:

// ==UserScript==
// @name         Instagram Downloader
// @namespace    https://github.com/NabiKAZ/instagram-downloader
// @version      0.2
// @license      GPL-3.0+; http://www.gnu.org/licenses/gpl-3.0.txt
// @description  Instagram Media Downloader For Web Version
// @author       Nabi K.A.Z. <[email protected]>
// @match        https://www.instagram.com/p/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var existCondition = setInterval(function() {
        var url = get_url();
        if (url) {
            var container = document.getElementsByTagName("header");
            var tag_a = document.createElement("a");
            tag_a.id = 'instagram_downloader_link';
            tag_a.href = url;
            tag_a.style.marginRight = "30px";
            tag_a.onmousemove = function() {
                this.href = get_url();
            };
            var tag_img = document.createElement("img");
            tag_img.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAABuUlEQVRYhe3WO2jVUBzH8Y/XFwq+qoJD6wtxErQ4OIgI4uZYBScXl7qIBRed3J3FQdChY11VBAXByUHBB4iIiotQxfpAHby1cUgOXGJyc5LmurQ/+EMe5////pKcc/5hUQtdSxvkbMAq/EbSrp1iLccZPMRsBk3wFTdxeJDwPXjZAy2LSaxtG34Q3yPgIZ5jc1vwEXyqAQ9xuy0DNxrAQ4xhHPfxBndxrA58I7rzMDBbcG0OZ2MNnKwAfMEh7M/iaKThLnbFGLhYUehVQc63CAMJzucTOwXF1sW4bKh/aucNHMepARp40c/AZUxhy4DgXUyX3RwXP8vnMwcSPMLukLgEq/Eem0rMfcAV/MnOZ3AtN+YcVmbHKzAhbVpl+owjeAanKxy/riiW1wg+VtQMW/cyuBox+DGGIuBbpbtf7Oc4AXciBz+R7pJtwRNc7+BnxJPBKO6VmNiGB9gZWStouKNgbfbRPmmT6Z2wAb6jJhx+wF5ps6jz6p5Ke/92vKuZ2xsXgpPJBslvpUu0KfwXhoOBNdlTNS3WJCby32M9bv0H8Bwu5eG9GpP+Ws20DJ6W9poD/eCLWnj6C898aFvxBYfrAAAAAElFTkSuQmCC';
            tag_a.appendChild(tag_img);
            container[0].appendChild(tag_a);

            clearInterval(existCondition);
        }
    }, 100);

    function get_url() {
        var html = document.querySelector("meta[property='og:video']");//video
        if (!html) {
            html = document.querySelector("meta[property='og:image']");//image
        }
        var url = '';
        if (html) {
            url = html.content;
        }
        return url;
    }

})();