-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
81 lines (72 loc) · 2.89 KB
/
index.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
78
79
80
81
<html lang="zh-cmn-Hans">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>简单订阅转换</title>
<script>
function Conver() {
var backendurl = "https://ssc.imldy.cn/sub"
const suburl_node = document.getElementsByName("suburl")[0];
const newhost_node = document.getElementsByName("newhost")[0];
var suburl = suburl_node.value
if (suburl == "") {
alert("原订阅链接不能为空")
return
}
var newhost = newhost_node.value
var encode_suburl = encodeURIComponent(suburl)
// 获取nameexclude
var nameexclude_node = document.getElementsByName("nameexclude")[0];
var nameexclude = nameexclude_node.value
var encode_nameexclude = encodeURIComponent(nameexclude)
// 包含关键字
var encode_nameinclude = encodeURIComponent(document.getElementsByName("nameinclude")[0].value)
var newsuburl_node = document.getElementsByName("newsuburl")[0];
newsuburl_node.value = backendurl + "?suburl=" + encode_suburl + "&newhost=" + newhost + "&nameexclude=" + encode_nameexclude
+ "&nameinclude=" + encode_nameinclude
}
</script>
<style type="text/css">
.button {
width: 100px;
height: 50px;
color: rgb(255, 0, 0);
font-size: large;
}
#main {
margin: auto;
width: 1080px;
border: 3px whitesmoke solid;
padding: 5px;
}
.small {
width: max-content;
}
.arg {
background-color: rgb(200, 224, 194);
}
.result {
background-color: rgb(229, 162, 130);
width: max-content;
}
</style>
</head>
<body>
<div id="main">
<p class="arg small">原订阅链接👇</p>
<textarea name="suburl" spellcheck="false" rows="2" cols="100"></textarea>
<p class="arg small">新host👇</p>
<input name="newhost" type="text" value="">
<p class="arg small">节点名过滤👇</p>
<label>排除关键字:</label><input name="nameexclude" placeholder="测试,游戏" type="text"><br>
<label>包含关键字:</label><input name="nameinclude" placeholder="公免" type="text">
<br><br>
<button class="button" onclick="Conver()">转换</button>
<p class="result small">新订阅链接👇</p>
<textarea name="newsuburl" spellcheck="false" rows="3" cols="100"></textarea>
<p>将这个链接当作订阅链接导入你的客户端软件👆</p>
<p>Github Repository: <a href="https://github.com/imldy/ssc-web">imldy/ssc-web</a></p>
</div>
</body>
</html>