Mercurial > ec-userscripts
annotate cuffs-hulotte-popup.user.js @ 66:444b17e657be
Standardize code style
author | nanaya <me@nanaya.pro> |
---|---|
date | Wed, 10 Jul 2019 22:36:31 +0900 |
parents | 960d452dea99 |
children | 521dda0a0b6f |
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 | |
66 | 14 /* global jQuery, stopload */ |
15 ;(function () { | |
16 'use strict' | |
43 | 17 |
66 | 18 var $ = jQuery |
19 var rules = [] | |
20 var i | |
21 var styleEl | |
43 | 22 |
66 | 23 if (document.querySelector('body > #mainContent') != null) { |
24 rules.push('body > :not(#mainContent) { display: none !important; }') | |
25 } | |
26 | |
27 rules.push('#load_bg { display: none !important; }') | |
28 rules.push('body > .modal { display: none !important; }') | |
29 rules.push('body > div[style*="position: fixed"] { display: none !important; }') | |
45 | 30 |
66 | 31 for (i = 0; i < rules.length; i++) { |
32 styleEl = document.createElement('style') | |
33 document.head.appendChild(styleEl) | |
34 styleEl.sheet.insertRule(rules[i], 0) | |
35 } | |
38 | 36 |
66 | 37 $(function () { |
38 $('.cboxElement').removeClass('cboxElement') | |
39 }) | |
47 | 40 |
66 | 41 // force remove modal |
42 $.cookie('modal', 'off') | |
43 if (typeof stopload === 'function') { | |
44 stopload() | |
45 } | |
46 }).call() |