Mercurial > ec-userscripts
comparison surugaya-fixes.user.js @ 68:7784a39c891b
Add script to fix suruga-ya display
author | nanaya <me@nanaya.pro> |
---|---|
date | Fri, 03 Apr 2020 14:34:12 +0900 |
parents | |
children | cd36abde74ff |
comparison
equal
deleted
inserted
replaced
67:f03e2d169a8a | 68:7784a39c891b |
---|---|
1 // ==UserScript== | |
2 // @name suruga-ya fixes | |
3 // @namespace https://myconan.net | |
4 // @version 0.1.0 | |
5 // @description Show all products | |
6 // @author nanaya | |
7 // @match https://www.suruga-ya.jp/* | |
8 // @grant none | |
9 // @downloadURL https://hg.sr.ht/~nanaya/ec-userscripts/raw/default/surugaya-fixes.user.js | |
10 // ==/UserScript== | |
11 | |
12 ;(function () { | |
13 'use strict' | |
14 | |
15 const hasAdultCookie = document.cookie.split('; ').includes('adult=1') | |
16 | |
17 if (hasAdultCookie) { | |
18 return | |
19 } | |
20 | |
21 const d = new Date() | |
22 d.setTime(d.getTime() + (100 * 24 * 60 * 60 * 1000)) | |
23 document.cookie = `adult=1; expires=${d.toGMTString()}; path=/` | |
24 window.location.reload() | |
25 }).call() |