nhentai block popunders

Pls no popunders ok

Stan na 02-04-2018. Zobacz najnowsza wersja.

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        nhentai block popunders
// @namespace   sayixz01icji0pgmio1f4ayoth4vpuj2
// @description Pls no popunders ok
// @license     MIT License
// @match       *://*.nhentai.net/*
// @version     1.0
// @grant       none
// @run-at      document-start
// ==/UserScript==

/* jshint bitwise: true, curly: true, eqeqeq: true, esversion: 6,
funcscope: false, futurehostile: true, latedef: true, noarg: true,
nocomma: true, nonbsp: true, nonew: true, notypeof: false,
shadow: outer, singleGroups: true, strict: true, undef: true,
unused: true, varstmt: true, browser: true */

(function () {
	"use strict";

	// Next popunder in one day
	function killPopunders() {
		const key = "popunder_state";

		let state;

		try {
			let savedState = localStorage.getItem(key);

			if (savedState) {
				state = JSON.parse(savedState);
			}
		} catch (ignore) {}

		if (!state) {
			state = {};
		}

		state.lock_until = Date.now() + 86400000;

		try {
			localStorage.setItem(key, JSON.stringify(state));
		} catch (ignore) {}
	}

	killPopunders();

	// Call this every 23h in case some dweeb leaves their porn tabs open
	setInterval(killPopunders, 82800000);
})();