# HG changeset patch # User nanaya # Date 1708517956 -32400 # Node ID bb4795a52a468ceee24a7ea879544189eac72761 # Parent 717bc604371bff83c959f5c67d8a8bc3ea4855b3 Update consent cookie diff -r 717bc604371b -r bb4795a52a46 surugaya-always-consent.user.js --- a/surugaya-always-consent.user.js Sun Jan 07 19:20:55 2024 +0900 +++ b/surugaya-always-consent.user.js Wed Feb 21 21:19:16 2024 +0900 @@ -1,7 +1,7 @@ // ==UserScript== // @name suruga-ya always consent // @namespace https://nanaya.net -// @version 2.0.2 +// @version 2.0.3 // @description always inject adult consent cookie // @author nanaya // @match https://www.suruga-ya.jp/* @@ -11,10 +11,12 @@ 'use strict'; -const hasAdultCookie = document.cookie.split('; ').includes('adult=1'); +const hasAdultCookie = document.cookie.split('; ').includes('safe_search_expired=3'); if (!hasAdultCookie) { const d = new Date(); d.setTime(d.getTime() + (100 * 24 * 60 * 60 * 1000)); - document.cookie = `adult=1; expires=${d.toGMTString()}; path=/`; + const options = `expires=${d.toGMTString()};path=/`; + document.cookie = `safe_search_expired=3;${options};`; + document.cookie = `safe_search_option=3;${options};`; window.location.reload(); }