-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmo-img-unlock.user.js
41 lines (40 loc) · 1.49 KB
/
mo-img-unlock.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
31
32
33
34
35
36
37
38
39
40
41
// ==UserScript==
// @name mo (LDH) 图片解锁器
// @namespace https://1mether.me/
// @version 0.6
// @description 解锁mo页面图片右键功能
// @author 乙醚(@locoda)
// @match http*://m.tribe-m.jp/*
// @match http*://m.ex-m.jp/*
// @match http*://m.ldh-m.jp/*
// @match http*://m.ldhgirls-m.jp/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=ldh.co.jp
// @source https://github.com/locoda/mo-downloader
// @updateURL https://github.com/locoda/mo-downloader/raw/main/mo-img-unlock.user.js
// @downloadURL https://github.com/locoda/mo-downloader/raw/main/mo-img-unlock.user.js
// @grant none
// @license MIT
// ==/UserScript==
(function () {
"use strict";
// 移除右键限制
document.oncontextmenu = function () {
return true;
};
// 移除protectimg限制
document
.querySelectorAll(".protectimg")
.forEach((node) => node.classList.remove("protectimg"));
// 监控 DOM 变化
var observer = new MutationObserver(function (mutations, observer) {
console.log(mutations)
// 如果有变化再移除protectimg限制
document
.querySelectorAll(".protectimg")
.forEach((node) => node.classList.remove("protectimg"));
});
observer.observe(document, {
subtree: true,
childList: true,
});
})();