annotate cuffs-hulotte-popup.user.js @ 44:822ff5800f20

More updates
author nanaya <me@nanaya.pro>
date Thu, 24 Aug 2017 19:49:24 +0900
parents f52f5727818f
children 5536da666361
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
44
822ff5800f20 More updates
nanaya <me@nanaya.pro>
parents: 43
diff changeset
4 // @version 1.0.9
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
Edho Arief <me@nanaya.pro>
parents:
diff changeset
11 // @downloadURL https://bitbucket.org/!api/2.0/snippets/nanayapro/TK64/tip/files/cuffs-hulotte-popup.user.js
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
f52f5727818f More rules for cuffs
nanaya <me@nanaya.pro>
parents: 42
diff changeset
22 if (document.querySelector('#load_bg') != null) {
44
822ff5800f20 More updates
nanaya <me@nanaya.pro>
parents: 43
diff changeset
23 rules.push('#load_bg { display: none !important; }');
43
f52f5727818f More rules for cuffs
nanaya <me@nanaya.pro>
parents: 42
diff changeset
24 }
38
Edho Arief <me@nanaya.pro>
parents: 37
diff changeset
25
42
456614d0a9ca Remove lightbox as well
nanaya <me@nanaya.pro>
parents: 41
diff changeset
26 if (document.querySelector('body > #mainContent') != null) {
44
822ff5800f20 More updates
nanaya <me@nanaya.pro>
parents: 43
diff changeset
27 rules.push('body > :not(#mainContent) { display: none !important; }');
43
f52f5727818f More rules for cuffs
nanaya <me@nanaya.pro>
parents: 42
diff changeset
28 }
f52f5727818f More rules for cuffs
nanaya <me@nanaya.pro>
parents: 42
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 });
40
23c1810da164 Only if there's main content
nanaya <me@nanaya.pro>
parents: 39
diff changeset
39 }).call();