annotate cuffs-hulotte-popup.user.js @ 57:09f735548b2c

No more snippets
author nanaya <me@nanaya.pro>
date Fri, 20 Jul 2018 00:43:27 +0900
parents bc45afe111d8
children 960d452dea99
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
47
bc45afe111d8 Das cute
nanaya <me@nanaya.pro>
parents: 46
diff changeset
4 // @version 1.1.2
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
57
09f735548b2c No more snippets
nanaya <me@nanaya.pro>
parents: 47
diff changeset
11 // @downloadURL https://bitbucket.org/nanayapro/ec-userscripts/raw/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
38
Edho Arief <me@nanaya.pro>
parents: 37
diff changeset
14 ;(function() {
42
456614d0a9ca Remove lightbox as well
nanaya <me@nanaya.pro>
parents: 41
diff changeset
15 "use strict";
456614d0a9ca Remove lightbox as well
nanaya <me@nanaya.pro>
parents: 41
diff changeset
16
456614d0a9ca Remove lightbox as well
nanaya <me@nanaya.pro>
parents: 41
diff changeset
17 var $ = jQuery;
44
822ff5800f20 More updates
nanaya <me@nanaya.pro>
parents: 43
diff changeset
18 var rules = [];
822ff5800f20 More updates
nanaya <me@nanaya.pro>
parents: 43
diff changeset
19 var i;
822ff5800f20 More updates
nanaya <me@nanaya.pro>
parents: 43
diff changeset
20 var styleEl;
43
f52f5727818f More rules for cuffs
nanaya <me@nanaya.pro>
parents: 42
diff changeset
21
42
456614d0a9ca Remove lightbox as well
nanaya <me@nanaya.pro>
parents: 41
diff changeset
22 if (document.querySelector('body > #mainContent') != null) {
44
822ff5800f20 More updates
nanaya <me@nanaya.pro>
parents: 43
diff changeset
23 rules.push('body > :not(#mainContent) { display: none !important; }');
43
f52f5727818f More rules for cuffs
nanaya <me@nanaya.pro>
parents: 42
diff changeset
24 }
f52f5727818f More rules for cuffs
nanaya <me@nanaya.pro>
parents: 42
diff changeset
25
45
5536da666361 More rules and be more confident 8D
nanaya <me@nanaya.pro>
parents: 44
diff changeset
26 rules.push('#load_bg { display: none !important; }');
5536da666361 More rules and be more confident 8D
nanaya <me@nanaya.pro>
parents: 44
diff changeset
27 rules.push('body > .modal { display: none !important; }');
46
c20e3e6b0a3f Even more rulesss
nanaya <me@nanaya.pro>
parents: 45
diff changeset
28 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
29
44
822ff5800f20 More updates
nanaya <me@nanaya.pro>
parents: 43
diff changeset
30 for (i = 0; i < rules.length; i++) {
822ff5800f20 More updates
nanaya <me@nanaya.pro>
parents: 43
diff changeset
31 styleEl = document.createElement('style');
42
456614d0a9ca Remove lightbox as well
nanaya <me@nanaya.pro>
parents: 41
diff changeset
32 document.head.appendChild(styleEl);
44
822ff5800f20 More updates
nanaya <me@nanaya.pro>
parents: 43
diff changeset
33 styleEl.sheet.insertRule(rules[i], 0);
42
456614d0a9ca Remove lightbox as well
nanaya <me@nanaya.pro>
parents: 41
diff changeset
34 }
38
Edho Arief <me@nanaya.pro>
parents: 37
diff changeset
35
42
456614d0a9ca Remove lightbox as well
nanaya <me@nanaya.pro>
parents: 41
diff changeset
36 $(function () {
456614d0a9ca Remove lightbox as well
nanaya <me@nanaya.pro>
parents: 41
diff changeset
37 $('.cboxElement').removeClass('cboxElement');
456614d0a9ca Remove lightbox as well
nanaya <me@nanaya.pro>
parents: 41
diff changeset
38 });
47
bc45afe111d8 Das cute
nanaya <me@nanaya.pro>
parents: 46
diff changeset
39
bc45afe111d8 Das cute
nanaya <me@nanaya.pro>
parents: 46
diff changeset
40 // force remove modal
bc45afe111d8 Das cute
nanaya <me@nanaya.pro>
parents: 46
diff changeset
41 $.cookie('modal', 'off');
bc45afe111d8 Das cute
nanaya <me@nanaya.pro>
parents: 46
diff changeset
42 if (typeof stopload === 'function') {
bc45afe111d8 Das cute
nanaya <me@nanaya.pro>
parents: 46
diff changeset
43 stopload();
bc45afe111d8 Das cute
nanaya <me@nanaya.pro>
parents: 46
diff changeset
44 }
40
23c1810da164 Only if there's main content
nanaya <me@nanaya.pro>
parents: 39
diff changeset
45 }).call();