Mercurial > ec-userscripts
annotate cuffs-hulotte-popup.user.js @ 61:753765f3814e
Not sure why but sometimes link style is null?
author | nanaya <me@nanaya.pro> |
---|---|
date | Sun, 12 May 2019 01:30:44 +0900 |
parents | 960d452dea99 |
children | 444b17e657be |
rev | line source |
---|---|
36 | 1 // ==UserScript== |
42 | 2 // @name Cuffs/Hulotte tuning |
36 | 3 // @namespace https://myconan.net |
58
960d452dea99
Bump version to force updating to new repository
nanaya <me@nanaya.pro>
parents:
57
diff
changeset
|
4 // @version 1.1.3 |
42 | 5 // @description Strip out Cuffs/Hulotte age confirmation popup, disables lightbox |
36 | 6 // @author nanaya |
7 // @match http://www.cuffs.co.jp/* | |
41 | 8 // @match http://www.cuffs-cube.jp/* |
36 | 9 // @match http://hulotte.jp/* |
10 // @grant none | |
57 | 11 // @downloadURL https://bitbucket.org/nanayapro/ec-userscripts/raw/tip/cuffs-hulotte-popup.user.js |
36 | 12 // ==/UserScript== |
13 | |
38 | 14 ;(function() { |
42 | 15 "use strict"; |
16 | |
17 var $ = jQuery; | |
44 | 18 var rules = []; |
19 var i; | |
20 var styleEl; | |
43 | 21 |
42 | 22 if (document.querySelector('body > #mainContent') != null) { |
44 | 23 rules.push('body > :not(#mainContent) { display: none !important; }'); |
43 | 24 } |
25 | |
45 | 26 rules.push('#load_bg { display: none !important; }'); |
27 rules.push('body > .modal { display: none !important; }'); | |
46 | 28 rules.push('body > div[style*="position: fixed"] { display: none !important; }'); |
45 | 29 |
44 | 30 for (i = 0; i < rules.length; i++) { |
31 styleEl = document.createElement('style'); | |
42 | 32 document.head.appendChild(styleEl); |
44 | 33 styleEl.sheet.insertRule(rules[i], 0); |
42 | 34 } |
38 | 35 |
42 | 36 $(function () { |
37 $('.cboxElement').removeClass('cboxElement'); | |
38 }); | |
47 | 39 |
40 // force remove modal | |
41 $.cookie('modal', 'off'); | |
42 if (typeof stopload === 'function') { | |
43 stopload(); | |
44 } | |
40 | 45 }).call(); |