Remove NSFW blur on GameBanana

Removes... NSFW blur...

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

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

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         Remove NSFW blur on GameBanana
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  Removes... NSFW blur...
// @author       HACKER3000
// @license      MIT
// @match        https://gamebanana.com/*
// @grant        none
// ==/UserScript==

function gb_remove_nsfw_blur() {
    Array.prototype.forEach.call(document.getElementsByClassName('NsfwPreview'), e => { //for each element with the NsfwPreview class
        var blur_idx = Array.prototype.indexOf.call(e.classList, 'NsfwPreview'); //get position in class array of NsfwPreview
        if (blur_idx > -1) {
            var e_cl = Array.from(e.classList); //make copy of classlist
            e_cl.splice(blur_idx, 1); //remove NsfwPreview from copy
            e.classList = e_cl; //write copy back
        }
    });
};

//im too stupid to trigger this properly so i just trigger on scroll and pointermove
window.addEventListener('scroll', gb_remove_nsfw_blur);
window.addEventListener('pointermove', gb_remove_nsfw_blur);
setTimeout(gb_remove_nsfw_blur, 5000);