annotate cuffs-hulotte-popup.user.js @ 102:3fded109e23a

Also run on own node
author nanaya <me@nanaya.net>
date Sat, 24 Dec 2022 21:33:30 +0900
parents 9c8cde985caf
children 2c4470b73ad9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
36
Edho Arief <me@nanaya.pro>
parents:
diff changeset
1 // ==UserScript==
42
456614d0a9ca Remove lightbox as well
nanaya <me@nanaya.pro>
parents: 41
diff changeset
2 // @name Cuffs/Hulotte tuning
36
Edho Arief <me@nanaya.pro>
parents:
diff changeset
3 // @namespace https://myconan.net
82
86da34e62d29 Update url
nanaya <me@nanaya.pro>
parents: 77
diff changeset
4 // @version 1.1.6
42
456614d0a9ca Remove lightbox as well
nanaya <me@nanaya.pro>
parents: 41
diff changeset
5 // @description Strip out Cuffs/Hulotte age confirmation popup, disables lightbox
36
Edho Arief <me@nanaya.pro>
parents:
diff changeset
6 // @author nanaya
Edho Arief <me@nanaya.pro>
parents:
diff changeset
7 // @match http://www.cuffs.co.jp/*
41
1ca21c3adcf0 Add more sites
nanaya <me@nanaya.pro>
parents: 40
diff changeset
8 // @match http://www.cuffs-cube.jp/*
36
Edho Arief <me@nanaya.pro>
parents:
diff changeset
9 // @match http://hulotte.jp/*
Edho Arief <me@nanaya.pro>
parents:
diff changeset
10 // @grant none
82
86da34e62d29 Update url
nanaya <me@nanaya.pro>
parents: 77
diff changeset
11 // @downloadURL https://hg.myconan.net/ec-userscripts/raw-file/tip/cuffs-hulotte-popup.user.js
36
Edho Arief <me@nanaya.pro>
parents:
diff changeset
12 // ==/UserScript==
Edho Arief <me@nanaya.pro>
parents:
diff changeset
13
66
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
14 /* global jQuery, stopload */
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
15 ;(function () {
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
16 'use strict'
43
f52f5727818f More rules for cuffs
nanaya <me@nanaya.pro>
parents: 42
diff changeset
17
85
9c8cde985caf Update standard and fix
nanaya <me@nanaya.pro>
parents: 82
diff changeset
18 const $ = jQuery
9c8cde985caf Update standard and fix
nanaya <me@nanaya.pro>
parents: 82
diff changeset
19 const rules = []
9c8cde985caf Update standard and fix
nanaya <me@nanaya.pro>
parents: 82
diff changeset
20 let i
9c8cde985caf Update standard and fix
nanaya <me@nanaya.pro>
parents: 82
diff changeset
21 let styleEl
43
f52f5727818f More rules for cuffs
nanaya <me@nanaya.pro>
parents: 42
diff changeset
22
66
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
23 if (document.querySelector('body > #mainContent') != null) {
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
24 rules.push('body > :not(#mainContent) { display: none !important; }')
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
25 }
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
26
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
27 rules.push('#load_bg { display: none !important; }')
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
28 rules.push('body > .modal { display: none !important; }')
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
29 rules.push('body > div[style*="position: fixed"] { display: none !important; }')
45
5536da666361 More rules and be more confident 8D
nanaya <me@nanaya.pro>
parents: 44
diff changeset
30
66
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
31 for (i = 0; i < rules.length; i++) {
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
32 styleEl = document.createElement('style')
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
33 document.head.appendChild(styleEl)
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
34 styleEl.sheet.insertRule(rules[i], 0)
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
35 }
38
Edho Arief <me@nanaya.pro>
parents: 37
diff changeset
36
66
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
37 $(function () {
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
38 $('.cboxElement').removeClass('cboxElement')
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
39 })
47
bc45afe111d8 Das cute
nanaya <me@nanaya.pro>
parents: 46
diff changeset
40
66
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
41 // force remove modal
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
42 $.cookie('modal', 'off')
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
43 if (typeof stopload === 'function') {
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
44 stopload()
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
45 }
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
46 }).call()