comparison 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
comparison
equal deleted inserted replaced
65:72ef6fcdff44 66:444b17e657be
9 // @match http://hulotte.jp/* 9 // @match http://hulotte.jp/*
10 // @grant none 10 // @grant none
11 // @downloadURL https://bitbucket.org/nanayapro/ec-userscripts/raw/tip/cuffs-hulotte-popup.user.js 11 // @downloadURL https://bitbucket.org/nanayapro/ec-userscripts/raw/tip/cuffs-hulotte-popup.user.js
12 // ==/UserScript== 12 // ==/UserScript==
13 13
14 ;(function() { 14 /* global jQuery, stopload */
15 "use strict"; 15 ;(function () {
16 'use strict'
16 17
17 var $ = jQuery; 18 var $ = jQuery
18 var rules = []; 19 var rules = []
19 var i; 20 var i
20 var styleEl; 21 var styleEl
21 22
22 if (document.querySelector('body > #mainContent') != null) { 23 if (document.querySelector('body > #mainContent') != null) {
23 rules.push('body > :not(#mainContent) { display: none !important; }'); 24 rules.push('body > :not(#mainContent) { display: none !important; }')
24 } 25 }
25 26
26 rules.push('#load_bg { display: none !important; }'); 27 rules.push('#load_bg { display: none !important; }')
27 rules.push('body > .modal { display: none !important; }'); 28 rules.push('body > .modal { display: none !important; }')
28 rules.push('body > div[style*="position: fixed"] { display: none !important; }'); 29 rules.push('body > div[style*="position: fixed"] { display: none !important; }')
29 30
30 for (i = 0; i < rules.length; i++) { 31 for (i = 0; i < rules.length; i++) {
31 styleEl = document.createElement('style'); 32 styleEl = document.createElement('style')
32 document.head.appendChild(styleEl); 33 document.head.appendChild(styleEl)
33 styleEl.sheet.insertRule(rules[i], 0); 34 styleEl.sheet.insertRule(rules[i], 0)
34 } 35 }
35 36
36 $(function () { 37 $(function () {
37 $('.cboxElement').removeClass('cboxElement'); 38 $('.cboxElement').removeClass('cboxElement')
38 }); 39 })
39 40
40 // force remove modal 41 // force remove modal
41 $.cookie('modal', 'off'); 42 $.cookie('modal', 'off')
42 if (typeof stopload === 'function') { 43 if (typeof stopload === 'function') {
43 stopload(); 44 stopload()
44 } 45 }
45 }).call(); 46 }).call()