-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinstall.html
77 lines (71 loc) · 2.75 KB
/
install.html
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
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<script>
function Base64() {
_keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
this.encode = function (input) {
var output = "";
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
var i = 0;
input = utf8_encode(input);
while (i < input.length) {
chr1 = input.charCodeAt(i++);
chr2 = input.charCodeAt(i++);
chr3 = input.charCodeAt(i++);
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if (isNaN(chr2)) {
enc3 = enc4 = 64;
} else if (isNaN(chr3)) {
enc4 = 64;
}
output = output + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4);
}
return output;
}
utf8_encode = function(_string) {
return _string.replace(/([\u2E80-\u2EFF\u2F00-\u2FDF\u3000-\u303F\u31C0-\u31EF\u3200-\u32FF\u3300-\u33FF\u3400-\u4DBF\u4DC0-\u4DFF\u4E00-\u9FBF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF])/g, str => {
return '\\u' + str.charCodeAt(0).toString(16)
})
}
}
function addonApp() {
var base64 = new Base64();
var codeStr = base64.encode(
`(function () {
const script = document.createElement('script');
script.setAttribute('src', 'https://newbiepr.github.io/shinymaskr/ShinyColors.user.js');
document.head.appendChild(script);
})();`
);
var appJson = {
author: "Newbie(Origin:Biuuu)",
code: codeStr,
id: "1",
name: "샤니마스한글화",
url: "shinycolors.enza.fun/*",
};
var appStr = JSON.stringify(appJson);
var addon_result = base64.encode(appStr);
try {
window.via.addon(addon_result);
} catch (error) {
console.log(error);
}
}
if (window.via && typeof window.via.addon === "function") {
addonApp();
} else {
alert('귀하의 브라우저에서 이 플러그인 설치가 지원되지 않습니다') <!-- source : https://www.shiny.fun/install.html -->
}
</script>
</body>
</html>