comparison cuffs-hulotte-popup.user.js @ 45:5536da666361

More rules and be more confident 8D
author nanaya <me@nanaya.pro>
date Thu, 24 Aug 2017 20:47:09 +0900
parents 822ff5800f20
children c20e3e6b0a3f
comparison
equal deleted inserted replaced
44:822ff5800f20 45:5536da666361
1 // ==UserScript== 1 // ==UserScript==
2 // @name Cuffs/Hulotte tuning 2 // @name Cuffs/Hulotte tuning
3 // @namespace https://myconan.net 3 // @namespace https://myconan.net
4 // @version 1.0.9 4 // @version 1.1.0
5 // @description Strip out Cuffs/Hulotte age confirmation popup, disables lightbox 5 // @description Strip out Cuffs/Hulotte age confirmation popup, disables lightbox
6 // @author nanaya 6 // @author nanaya
7 // @match http://www.cuffs.co.jp/* 7 // @match http://www.cuffs.co.jp/*
8 // @match http://www.cuffs-cube.jp/* 8 // @match http://www.cuffs-cube.jp/*
9 // @match http://hulotte.jp/* 9 // @match http://hulotte.jp/*
17 var $ = jQuery; 17 var $ = jQuery;
18 var rules = []; 18 var rules = [];
19 var i; 19 var i;
20 var styleEl; 20 var styleEl;
21 21
22 if (document.querySelector('#load_bg') != null) {
23 rules.push('#load_bg { display: none !important; }');
24 }
25
26 if (document.querySelector('body > #mainContent') != null) { 22 if (document.querySelector('body > #mainContent') != null) {
27 rules.push('body > :not(#mainContent) { display: none !important; }'); 23 rules.push('body > :not(#mainContent) { display: none !important; }');
28 } 24 }
25
26 rules.push('#load_bg { display: none !important; }');
27 rules.push('body > .modal { display: none !important; }');
29 28
30 for (i = 0; i < rules.length; i++) { 29 for (i = 0; i < rules.length; i++) {
31 styleEl = document.createElement('style'); 30 styleEl = document.createElement('style');
32 document.head.appendChild(styleEl); 31 document.head.appendChild(styleEl);
33 styleEl.sheet.insertRule(rules[i], 0); 32 styleEl.sheet.insertRule(rules[i], 0);