1/4/2021, 4:01:31 PM
当前为
// ==UserScript==
// @name Image Popup - humaniplex.com
// @namespace Violentmonkey Scripts
// @match https://www.humaniplex.com/*
// @grant none
// @version 1.0
// @author -
// @description 1/4/2021, 4:01:31 PM
// ==/UserScript==
let $head = document.querySelector('head')
let $link = document.createElement('link')
$link.rel = 'stylesheet'
$link.href = '//cdn.jsdelivr.net/npm/glightbox/dist/css/glightbox.min.css'
let $script = document.createElement('script')
$script.type = 'text/javascript'
$script.src = '//cdn.jsdelivr.net/gh/mcstudios/glightbox/dist/js/glightbox.min.js'
$head.append($link)
$head.append($script)
setTimeout(() => {
document.querySelectorAll('.ph_cont .ph a').forEach((a) => {
if (a.className) {
a.className += ' glightbox'
} else {
a.className = 'glightbox'
}
})
let lightbox = GLightbox({})
console.log('done')
}, 2000)