KodieFiles Image Redirect

Links from a KodieFiles.nl gallery page directly to images.

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

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 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           KodieFiles Image Redirect
// @namespace      https://greasyfork.org/users/4390-seriousm
// @description    Links from a KodieFiles.nl gallery page directly to images.
// @match          http://www.kodiefiles.nl/*
// @version        0.4
// ==/UserScript==

// collect all links
var allLinks = document.getElementsByTagName('a')

// walk through the array

for(var i=0; i < allLinks.length; i++) {
if (allLinks[i].href.indexOf('images.kodiefiles.nl') > 0){
        allLinks[i].href = allLinks[i].href.replace('www.kodiefiles.nl','images.kodiefiles.nl');
	allLinks[i].href = allLinks[i].href.substr(0, allLinks[i].href.lastIndexOf('/') +1) + 'full' + allLinks[i].href.substr(allLinks[i].href.lastIndexOf('/'));
        allLinks[i].href = allLinks[i].href.replace('.html','.jpg');}
}

// that's it!