epicgames.com Store Age Check Bypass

Sets cookies to fake passed age check (1970-01-01)

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        epicgames.com Store Age Check Bypass
// @match       https://store.epicgames.com/*/p/*
// @match	https://store.epicgames.com/*/bundles/*
// @grant       none
// @version     0.0.2
// @icon        https://icons.duckduckgo.com/ip2/epicgames.com.ico
// @description Sets cookies to fake passed age check (1970-01-01)
// @license     Unlicense
// @run-at      document-start
// @namespace https://greasyfork.org/users/1257939
// ==/UserScript==

function getCookie(name) {
	// Source: https://stackoverflow.com/a/24103596
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}

if (!getCookie("HasAcceptedAgeGates")) {
	document.cookie = "egs_age_gate_dob=1970-0-1; path=/";
	document.cookie = "HasAcceptedAgeGates=USK%3A18; path=/";
	document.location = document.location;
}