comparison cuffs-hulotte-popup.user.js @ 43:f52f5727818f

More rules for cuffs
author nanaya <me@nanaya.pro>
date Thu, 24 Aug 2017 04:11:29 +0900
parents 456614d0a9ca
children 822ff5800f20
comparison
equal deleted inserted replaced
42:456614d0a9ca 43:f52f5727818f
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.7 4 // @version 1.0.8
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/*
13 13
14 ;(function() { 14 ;(function() {
15 "use strict"; 15 "use strict";
16 16
17 var $ = jQuery; 17 var $ = jQuery;
18 var rules = '';
19
20 if (document.querySelector('#load_bg') != null) {
21 rules += ' #load_bg { display: none !important; } ';
22 }
18 23
19 if (document.querySelector('body > #mainContent') != null) { 24 if (document.querySelector('body > #mainContent') != null) {
25 rules += ' body > :not(#mainContent) { display: none !important; } ';
26 }
27
28 if (rules !== '') {
20 var styleEl = document.createElement('style'); 29 var styleEl = document.createElement('style');
21 document.head.appendChild(styleEl); 30 document.head.appendChild(styleEl);
22 var styleSheet = styleEl.sheet; 31 var styleSheet = styleEl.sheet;
23 32
24 styleSheet.insertRule( 33 styleSheet.insertRule(
25 'body > :not(#mainContent) { display: none !important; }', 34 rules,
26 styleSheet.cssRules.length 35 styleSheet.cssRules.length
27 ); 36 );
28 } 37 }
29 38
30 $(function () { 39 $(function () {