forked from jxn-30/LSS-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLightbox-Lightbox.user.js
30 lines (28 loc) · 1.43 KB
/
Lightbox-Lightbox.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// ==UserScript==
// @name LSS-Lightbox-Lightbox
// @version 1.0.0
// @author Jan (jxn_30)
// @description Allows opening Lightboxes within a Lightbox
// @include /^https?:\/\/(?:w{3}\.)?(?:operacni-stredisko\.cz|alarmcentral-spil\.dk|leitstellenspiel\.de|missionchief\.gr|(?:missionchief-australia|missionchief|hatakeskuspeli|missionchief-japan|missionchief-korea|nodsentralspillet|meldkamerspel|operador193|jogo-operador112|jocdispecerat112|dispecerske-centrum|112-merkez|dyspetcher101-game)\.com|missionchief\.co\.uk|centro-de-mando\.es|centro-de-mando\.mx|operateur112\.fr|operatore112\.it|operatorratunkowy\.pl|dispetcher112\.ru|larmcentralen-spelet\.se)\/.*$/
// @run-at document-idle
// ==/UserScript==
(function() {
'use strict';
if (document.getElementById('lightbox_background')) return;
const bg = document.createElement('div');
bg.id = 'lightbox_background';
bg.addEventListener('click', lightboxClose);
const box = document.createElement('div');
box.id = 'lightbox_box';
const close = document.createElement('button');
close.classList.add('close');
close.type = 'button';
close.id = 'lightbox_close';
const times = document.createElement('span');
times.innerHTML = '×';
close.appendChild(times);
close.addEventListener('click', lightboxClose);
box.appendChild(close);
document.body.appendChild(bg);
document.body.appendChild(box);
})();