KodieFiles Image Redirect

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

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           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!