comparison cuffs-hulotte-popup.user.js @ 42:456614d0a9ca

Remove lightbox as well Change indentation to 4
author nanaya <me@nanaya.pro>
date Thu, 27 Jul 2017 21:25:33 +0900
parents 1ca21c3adcf0
children f52f5727818f
comparison
equal deleted inserted replaced
41:1ca21c3adcf0 42:456614d0a9ca
1 // ==UserScript== 1 // ==UserScript==
2 // @name Cuffs/Hulotte popup disable 2 // @name Cuffs/Hulotte tuning
3 // @namespace https://myconan.net 3 // @namespace https://myconan.net
4 // @version 1.0.5 4 // @version 1.0.7
5 // @description Strip out Cuffs/Hulotte age confirmation popup 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/*
10 // @grant none 10 // @grant none
11 // @downloadURL https://bitbucket.org/!api/2.0/snippets/nanayapro/TK64/tip/files/cuffs-hulotte-popup.user.js 11 // @downloadURL https://bitbucket.org/!api/2.0/snippets/nanayapro/TK64/tip/files/cuffs-hulotte-popup.user.js
12 // ==/UserScript== 12 // ==/UserScript==
13 13
14 ;(function() { 14 ;(function() {
15 "use strict"; 15 "use strict";
16 16
17 if (document.querySelector('body > #mainContent') == null) { 17 var $ = jQuery;
18 return;
19 }
20 18
21 var styleEl = document.createElement('style'); 19 if (document.querySelector('body > #mainContent') != null) {
22 document.head.appendChild(styleEl); 20 var styleEl = document.createElement('style');
23 var styleSheet = styleEl.sheet; 21 document.head.appendChild(styleEl);
22 var styleSheet = styleEl.sheet;
24 23
25 styleSheet.insertRule( 24 styleSheet.insertRule(
26 'body > :not(#mainContent) { display: none !important; }', 25 'body > :not(#mainContent) { display: none !important; }',
27 styleSheet.cssRules.length 26 styleSheet.cssRules.length
28 ); 27 );
28 }
29
30 $(function () {
31 $('.cboxElement').removeClass('cboxElement');
32 });
29 }).call(); 33 }).call();