forked from fireattack/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrysail_unlock_right-click.user.js
More file actions
67 lines (59 loc) · 1.93 KB
/
trysail_unlock_right-click.user.js
File metadata and controls
67 lines (59 loc) · 1.93 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// ==UserScript==
// @name Trysail.jp Unlock right-click
// @namespace https://twitter.com/ikenaikoto
// @version 0.4
// @description Get rekt Music Ray'n
// @author fireattack
// @match https://trysail.jp/*
// @match https://sphere.m-rayn.jp/*
// @grant GM_addStyle
// ==/UserScript==
(function () {
/* Remove CSS bullshit */
GM_addStyle(`
.protect .img-protect {
user-select: auto !important;
-moz-user-select: auto !important;
-ms-user-select: auto !important;
-webkit-user-select: auto !important;
-khtml-user-select: auto !important;
-webkit-user-drag: auto !important;
-khtml-user-drag: auto !important;
-webkit-touch-callout: auto !important;
}
.protect .img-protect img {
user-select: auto !important;
-moz-user-select: auto !important;
-ms-user-select: auto !important;
-webkit-user-select: auto !important;
-khtml-user-select: auto !important;
-webkit-user-drag: auto !important;
-khtml-user-drag: auto !important;
-webkit-touch-callout: auto !important;
}
.protect .img-protect:after {
content: none !important;
}
`);
function allowCopy() {
/* Allow Copy */
//$("#image-and-banners").remove();
//$("body").unbind('load');
$("body").unbind('contextmenu');
$(".protect-content").unbind('mousedown');
$(".protect-content").unbind('selectstart');
$(".protect-content").unbind('contextmenu');
}
// Remove loading and adjust cover
$('.main-visual-item .img-responsive').height(200);
$('.main-visual-item .img-responsive').width('auto');
$("#jsLoading").remove();
var observer = new MutationObserver(function (mutations, ob) {
mutations.forEach(function (mutation) {
console.log('Re-adding allowCopy..');
allowCopy();
});
});
var config = { attributes: true };
observer.observe(document.body, config);
})();