view lashinbang-always-consent.user.js @ 136:1e64e81370a3 default tip

Add nginx-https
author nanaya <me@nanaya.net>
date Tue, 27 Feb 2024 01:17:43 +0900
parents dc960ef1248b
children
line wrap: on
line source

// ==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();
}