view cuffs-hulotte-popup.user.js @ 43:f52f5727818f

More rules for cuffs
author nanaya <me@nanaya.pro>
date Thu, 24 Aug 2017 04:11:29 +0900
parents 456614d0a9ca
children 822ff5800f20
line wrap: on
line source

// ==UserScript==
// @name         Cuffs/Hulotte tuning
// @namespace    https://myconan.net
// @version      1.0.8
// @description  Strip out Cuffs/Hulotte age confirmation popup, disables lightbox
// @author       nanaya
// @match        http://www.cuffs.co.jp/*
// @match        http://www.cuffs-cube.jp/*
// @match        http://hulotte.jp/*
// @grant        none
// @downloadURL  https://bitbucket.org/!api/2.0/snippets/nanayapro/TK64/tip/files/cuffs-hulotte-popup.user.js
// ==/UserScript==

;(function() {
    "use strict";

    var $ = jQuery;
    var rules = '';

    if (document.querySelector('#load_bg') != null) {
        rules += ' #load_bg { display: none !important; } ';
    }

    if (document.querySelector('body > #mainContent') != null) {
        rules += ' body > :not(#mainContent) { display: none !important; } ';
    }

    if (rules !== '') {
        var styleEl = document.createElement('style');
        document.head.appendChild(styleEl);
        var styleSheet = styleEl.sheet;

        styleSheet.insertRule(
            rules,
            styleSheet.cssRules.length
        );
    }

    $(function () {
        $('.cboxElement').removeClass('cboxElement');
    });
}).call();