# HG changeset patch # User nanaya # Date 1501158333 -32400 # Node ID 456614d0a9cafcb4615b6c450c7034da6f733e78 # Parent 1ca21c3adcf0bad11d6fd3f4177e99de01091e48 Remove lightbox as well Change indentation to 4 diff -r 1ca21c3adcf0 -r 456614d0a9ca cuffs-hulotte-popup.user.js --- a/cuffs-hulotte-popup.user.js Fri Jul 21 19:18:31 2017 +0900 +++ b/cuffs-hulotte-popup.user.js Thu Jul 27 21:25:33 2017 +0900 @@ -1,8 +1,8 @@ // ==UserScript== -// @name Cuffs/Hulotte popup disable +// @name Cuffs/Hulotte tuning // @namespace https://myconan.net -// @version 1.0.5 -// @description Strip out Cuffs/Hulotte age confirmation popup +// @version 1.0.7 +// @description Strip out Cuffs/Hulotte age confirmation popup, disables lightbox // @author nanaya // @match http://www.cuffs.co.jp/* // @match http://www.cuffs-cube.jp/* @@ -12,18 +12,22 @@ // ==/UserScript== ;(function() { - "use strict"; + "use strict"; + + var $ = jQuery; - if (document.querySelector('body > #mainContent') == null) { - return; - } + if (document.querySelector('body > #mainContent') != null) { + var styleEl = document.createElement('style'); + document.head.appendChild(styleEl); + var styleSheet = styleEl.sheet; - var styleEl = document.createElement('style'); - document.head.appendChild(styleEl); - var styleSheet = styleEl.sheet; + styleSheet.insertRule( + 'body > :not(#mainContent) { display: none !important; }', + styleSheet.cssRules.length + ); + } - styleSheet.insertRule( - 'body > :not(#mainContent) { display: none !important; }', - styleSheet.cssRules.length - ); + $(function () { + $('.cboxElement').removeClass('cboxElement'); + }); }).call();