Mercurial > ec-userscripts
diff lashinbang-always-consent.user.js @ 129:dc960ef1248b
Add lashinbang always consent script
author | nanaya <me@nanaya.net> |
---|---|
date | Tue, 07 Feb 2023 21:51:34 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lashinbang-always-consent.user.js Tue Feb 07 21:51:34 2023 +0900 @@ -0,0 +1,22 @@ +// ==UserScript== +// @name lashinbang always consent +// @namespace https://nanaya.net +// @version 1.0.0 +// @description always apply adult consent session +// @author nanaya +// @match https://shop.lashinbang.com/* +// @grant none +// @downloadURL https://hg.nanaya.net/ec-userscripts/raw-file/tip/lashinbang-always-consent.user.js +// ==/UserScript== + +'use strict'; + +async function consent () { + await fetch('https://shop.lashinbang.com/age_check'); + window.location.reload(); +} + +const consentOffLink = document.querySelector('a[href="https://shop.lashinbang.com/age_check_off"]'); +if (consentOffLink == null) { + consent(); +}