view surugaya-fixes.user.js @ 69:cd36abde74ff

Bump version
author nanaya <me@nanaya.pro>
date Fri, 03 Apr 2020 14:34:35 +0900
parents 7784a39c891b
children 5a3a269c5e6f
line wrap: on
line source

// ==UserScript==
// @name         suruga-ya fixes
// @namespace    https://myconan.net
// @version      1.0.0
// @description  Show all products
// @author       nanaya
// @match        https://www.suruga-ya.jp/*
// @grant        none
// @downloadURL  https://hg.sr.ht/~nanaya/ec-userscripts/raw/default/surugaya-fixes.user.js
// ==/UserScript==

;(function () {
  'use strict'

  const hasAdultCookie = document.cookie.split('; ').includes('adult=1')

  if (hasAdultCookie) {
    return
  }

  const d = new Date()
  d.setTime(d.getTime() + (100 * 24 * 60 * 60 * 1000))
  document.cookie = `adult=1; expires=${d.toGMTString()}; path=/`
  window.location.reload()
}).call()