comparison cuffs-hulotte-popup.user.js @ 108:2c4470b73ad9

Switch to semistandard No more `;` at the start of line.
author nanaya <me@nanaya.net>
date Sun, 15 Jan 2023 23:24:03 +0900
parents 9c8cde985caf
children ef21ef445fc6
comparison
equal deleted inserted replaced
107:4bc5a633437c 108:2c4470b73ad9
10 // @grant none 10 // @grant none
11 // @downloadURL https://hg.myconan.net/ec-userscripts/raw-file/tip/cuffs-hulotte-popup.user.js 11 // @downloadURL https://hg.myconan.net/ec-userscripts/raw-file/tip/cuffs-hulotte-popup.user.js
12 // ==/UserScript== 12 // ==/UserScript==
13 13
14 /* global jQuery, stopload */ 14 /* global jQuery, stopload */
15 ;(function () { 15 (function () {
16 'use strict' 16 'use strict';
17 17
18 const $ = jQuery 18 const $ = jQuery;
19 const rules = [] 19 const rules = [];
20 let i 20 let i;
21 let styleEl 21 let styleEl;
22 22
23 if (document.querySelector('body > #mainContent') != null) { 23 if (document.querySelector('body > #mainContent') != null) {
24 rules.push('body > :not(#mainContent) { display: none !important; }') 24 rules.push('body > :not(#mainContent) { display: none !important; }');
25 } 25 }
26 26
27 rules.push('#load_bg { display: none !important; }') 27 rules.push('#load_bg { display: none !important; }');
28 rules.push('body > .modal { display: none !important; }') 28 rules.push('body > .modal { display: none !important; }');
29 rules.push('body > div[style*="position: fixed"] { display: none !important; }') 29 rules.push('body > div[style*="position: fixed"] { display: none !important; }');
30 30
31 for (i = 0; i < rules.length; i++) { 31 for (i = 0; i < rules.length; i++) {
32 styleEl = document.createElement('style') 32 styleEl = document.createElement('style');
33 document.head.appendChild(styleEl) 33 document.head.appendChild(styleEl);
34 styleEl.sheet.insertRule(rules[i], 0) 34 styleEl.sheet.insertRule(rules[i], 0);
35 } 35 }
36 36
37 $(function () { 37 $(function () {
38 $('.cboxElement').removeClass('cboxElement') 38 $('.cboxElement').removeClass('cboxElement');
39 }) 39 });
40 40
41 // force remove modal 41 // force remove modal
42 $.cookie('modal', 'off') 42 $.cookie('modal', 'off');
43 if (typeof stopload === 'function') { 43 if (typeof stopload === 'function') {
44 stopload() 44 stopload();
45 } 45 }
46 }).call() 46 }).call();