Img changer

changes most (some exeptions) images on a page

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Img changer
// @version      0.1
// @description  changes most (some exeptions) images on a page
// @author       Not you
// @match        *://*/*
// @grant        none
// @namespace https://greasyfork.org/users/12092
// ==/UserScript==
var src = "https://cloud.githubusercontent.com/assets/10279512/8022411/7ce67eb0-0c84-11e5-9017-6b87ae8eff87.jpg" 
/*CHANGE THE URL IN QUOTES TO A URL. URL MUST HAVE HTTPS:// BEFORE IT. NOT HTTP://
IF YOU CANNOT FIND ONE USE THIS: http://httpsimage.com/
THANK YOU
*/
function replace() {
var inputs = document.getElementsByTagName("input");
    var inputimgs = [];
    for(var i = 0;i < inputs.length;i ++) {
        if(inputs[i].type == "image") inputimgs = inputimgs.concat(inputs[i]);
    }
var imgs = document.getElementsByTagName("img");
//var imgs2 = imgs.concat(inputimgs);
for(var i = 0;i < imgs.length;i ++) {
    var width = imgs[i].clientWidth;
    var height = imgs[i].clientHeight;
    imgs[i].srcset = src;
    imgs[i].src = src;
    imgs[i].width = width;
    imgs[i].height = height;
    console.log(imgs[i]);
}
    for(var i = 0;i < inputimgs.length;i ++) {
    var width = inputimgs[i].clientWidth;
    var height = inputimgs[i].clientHeight;
    inputimgs[i].srcset = src;
    inputimgs[i].src = src;
    inputimgs[i].width = width;
    inputimgs[i].height = height;
    }
}

setInterval(replace(), 1000);