google_plus_image_address_finder

try to find out the download url of a google plus image

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

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

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==
// @name         google_plus_image_address_finder
// @namespace    NULL
// @version      0.1
// @description  try to find out the download url of a google plus image
// @author       Simon Shi
// @match        https://plus.google.com/photos/photo/*
// @grant        unsafeWindow
// @run-at       context-menu
// ==/UserScript==


function get_image()
{
    var image_list = [];

    image_list = unsafeWindow.document.getElementsByClassName("XkWAb-LmsqOc XkWAb-Iak2Lc");
    if(image_list.length === 0){
        console.log("[LS]no image found!!!");
        return 0;
    }
    var image_src = image_list[image_list.length-1].src;
    console.log("[LS]image src = "+image_src);
    var temp_a=document.createElement('a');
    document.body.appendChild(temp_a);
    temp_a.href=image_src.split("=")[0] + "=s0-d-ip";
    temp_a.click();
    document.removeChild(temp_a);
}


(function() {
    'use strict';

    console.log("[LS]Google Plus Image address finder :start");
    get_image();
})();