Mercurial > ec-userscripts
diff 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 |
line wrap: on
line diff
--- a/cuffs-hulotte-popup.user.js Wed Jul 10 22:30:14 2019 +0900 +++ b/cuffs-hulotte-popup.user.js Wed Jul 10 22:36:31 2019 +0900 @@ -11,35 +11,36 @@ // @downloadURL https://bitbucket.org/nanayapro/ec-userscripts/raw/tip/cuffs-hulotte-popup.user.js // ==/UserScript== -;(function() { - "use strict"; - - var $ = jQuery; - var rules = []; - var i; - var styleEl; +/* global jQuery, stopload */ +;(function () { + 'use strict' - if (document.querySelector('body > #mainContent') != null) { - rules.push('body > :not(#mainContent) { display: none !important; }'); - } + var $ = jQuery + var rules = [] + var i + var styleEl - rules.push('#load_bg { display: none !important; }'); - rules.push('body > .modal { display: none !important; }'); - rules.push('body > div[style*="position: fixed"] { display: none !important; }'); + if (document.querySelector('body > #mainContent') != null) { + rules.push('body > :not(#mainContent) { display: none !important; }') + } + + rules.push('#load_bg { display: none !important; }') + rules.push('body > .modal { display: none !important; }') + rules.push('body > div[style*="position: fixed"] { display: none !important; }') - for (i = 0; i < rules.length; i++) { - styleEl = document.createElement('style'); - document.head.appendChild(styleEl); - styleEl.sheet.insertRule(rules[i], 0); - } + for (i = 0; i < rules.length; i++) { + styleEl = document.createElement('style') + document.head.appendChild(styleEl) + styleEl.sheet.insertRule(rules[i], 0) + } - $(function () { - $('.cboxElement').removeClass('cboxElement'); - }); + $(function () { + $('.cboxElement').removeClass('cboxElement') + }) - // force remove modal - $.cookie('modal', 'off'); - if (typeof stopload === 'function') { - stopload(); - } -}).call(); + // force remove modal + $.cookie('modal', 'off') + if (typeof stopload === 'function') { + stopload() + } +}).call()