SpankBang Age Verification by JusyX
// ==UserScript==
// @name SpankBang Age Verification
// @namespace JusyX
// @version 1.1
// @description SpankBang Age Verification by JusyX
// @match https://spankbang.com/*
// @match https://*.spankbang.com/*
// @match *://spankbang.*/*
// @match *://spankbang.party/*
// @grant none
// @run-at document-idle
// @license MIT
// ==/UserScript==
(function () {
'use strict';
const replacements = {
coc: 'CA',
coe: 'us'
};
const currentCookies = {};
document.cookie.split(';').forEach(cookie => {
const [name, ...value] = cookie.trim().split('=');
currentCookies[name] = value.join('=');
});
if (
currentCookies.coc === 'CA' &&
currentCookies.coe === 'us'
) {
return;
}
const parts = location.hostname.split('.');
const domains = [null];
for (let i = 0; i < parts.length - 1; i++) {
domains.push('.' + parts.slice(i).join('.'));
}
for (const name of Object.keys(replacements)) {
for (const domain of domains) {
const domainPart = domain ? `; domain=${domain}` : '';
document.cookie =
`${name}=; Max-Age=0; path=/${domainPart}`;
}
}
for (const [name, value] of Object.entries(replacements)) {
document.cookie =
`${name}=${value}; path=/; SameSite=Lax`;
}
location.reload();
})();