Fix Games Workshop Image viewer

I am sick of their stupid magnifying glass so just wrote a horribly ugly fix to put the big images in by default.

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         Fix Games Workshop Image viewer
// @namespace    http://your.homepage/
// @version      0.1
// @description  I am sick of their stupid magnifying glass so just wrote a horribly ugly fix to put the big images in by default.
// @author       You
// @match        http://www.games-workshop.com/*
// @grant        snone
// ==/UserScript==
$('#hero-slot').css(
    {
        width: $(document).width(),
        textAlign: 'center'
    }
);
$('.img-holder').css(
    {
        width: 920,
        textAlign: 'center'
    }
);

$('.als-wrapper').on('click', '.als-item', function(ev){
    var imgSrc = $(this).find('img').attr('src'),
        imgSizePos = imgSrc.indexOf('70x70'),
        imgNewSrc = imgSrc.replace('70x70', '920x950');

    $('.img-holder img').attr('src', imgNewSrc);
    ev.stopPropagation();
    return false;
});