annotate cuffs-hulotte-popup.user.js @ 137:7a7aafa65bae default tip

Update url
author nanaya <me@nanaya.net>
date Fri, 17 May 2024 15:03:30 +0900
parents 8de2d53a4cb1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
36
Edho Arief <me@nanaya.pro>
parents:
diff changeset
1 // ==UserScript==
118
8de2d53a4cb1 Fix metadata
nanaya <me@nanaya.net>
parents: 117
diff changeset
2 // @name Cuffs/Hulotte tuning
8de2d53a4cb1 Fix metadata
nanaya <me@nanaya.net>
parents: 117
diff changeset
3 // @namespace https://nanaya.net
8de2d53a4cb1 Fix metadata
nanaya <me@nanaya.net>
parents: 117
diff changeset
4 // @version 1.1.6
8de2d53a4cb1 Fix metadata
nanaya <me@nanaya.net>
parents: 117
diff changeset
5 // @description Strip out Cuffs/Hulotte age confirmation popup, disables lightbox
8de2d53a4cb1 Fix metadata
nanaya <me@nanaya.net>
parents: 117
diff changeset
6 // @author nanaya
8de2d53a4cb1 Fix metadata
nanaya <me@nanaya.net>
parents: 117
diff changeset
7 // @match http://www.cuffs.co.jp/*
8de2d53a4cb1 Fix metadata
nanaya <me@nanaya.net>
parents: 117
diff changeset
8 // @match http://www.cuffs-cube.jp/*
8de2d53a4cb1 Fix metadata
nanaya <me@nanaya.net>
parents: 117
diff changeset
9 // @match http://hulotte.jp/*
8de2d53a4cb1 Fix metadata
nanaya <me@nanaya.net>
parents: 117
diff changeset
10 // @grant none
8de2d53a4cb1 Fix metadata
nanaya <me@nanaya.net>
parents: 117
diff changeset
11 // @downloadURL https://hg.nanaya.net/ec-userscripts/raw-file/tip/cuffs-hulotte-popup.user.js
36
Edho Arief <me@nanaya.pro>
parents:
diff changeset
12 // ==/UserScript==
Edho Arief <me@nanaya.pro>
parents:
diff changeset
13
109
ef21ef445fc6 Cleanups
nanaya <me@nanaya.net>
parents: 108
diff changeset
14 'use strict';
ef21ef445fc6 Cleanups
nanaya <me@nanaya.net>
parents: 108
diff changeset
15
66
444b17e657be Standardize code style
nanaya <me@nanaya.pro>
parents: 58
diff changeset
16 /* global jQuery, stopload */
117
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
17 const $ = jQuery;
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
18 const rules = [];
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
19 let i;
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
20 let styleEl;
45
5536da666361 More rules and be more confident 8D
nanaya <me@nanaya.pro>
parents: 44
diff changeset
21
117
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
22 if (document.querySelector('body > #mainContent') != null) {
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
23 rules.push('body > :not(#mainContent) { display: none !important; }');
109
ef21ef445fc6 Cleanups
nanaya <me@nanaya.net>
parents: 108
diff changeset
24 }
ef21ef445fc6 Cleanups
nanaya <me@nanaya.net>
parents: 108
diff changeset
25
117
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
26 rules.push('#load_bg { display: none !important; }');
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
27 rules.push('body > .modal { display: none !important; }');
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
28 rules.push('body > div[style*="position: fixed"] { display: none !important; }');
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
29
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
30 for (i = 0; i < rules.length; i++) {
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
31 styleEl = document.createElement('style');
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
32 document.head.appendChild(styleEl);
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
33 styleEl.sheet.insertRule(rules[i], 0);
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
34 }
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
35
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
36 $(function () {
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
37 $('.cboxElement').removeClass('cboxElement');
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
38 });
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
39
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
40 // force remove modal
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
41 $.cookie('modal', 'off');
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
42 if (typeof stopload === 'function') {
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
43 stopload();
d9dc190bccaf Undo combining fixes into single script per site
nanaya <me@nanaya.net>
parents: 109
diff changeset
44 }