forked from xyTom/Url-Shorten-Worker
-
Notifications
You must be signed in to change notification settings - Fork 355
/
index-cdn.html
103 lines (86 loc) · 4.65 KB
/
index-cdn.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="txt/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<title>Shorter URL</title>
<!-- <link rel="stylesheet" href="https://crazypeace.github.io/Url-Shorten-Worker/styles.css"> -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/crazypeace/Url-Shorten-Worker/styles.css">
</head>
<body>
<div class="d-flex align-items-start flex-wrap">
<div class="card shadow m-3">
<h5 class="card-header">A URL Shortener created using free Cloudflare worker and KV</h5>
<div class="card-body">
<h5 class="card-title"> </h5>
<div class="input-group mb-3">
<span class="input-group-text" id="basic-addon1">Long URL</span>
<input type="text" class="form-control" id="longURL" aria-describedby="basic-addon1" placeholder="Example: https://example.com/" oninput="loadUrlList()">
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="basic-addon2">Custom Short URL</span>
<input type="text" class="form-control" id="keyPhrase" aria-describedby="basic-addon2" placeholder="As you wish">
</div>
<div class="input-group mb-3">
<button class="btn btn-primary" type="button" onclick='shorturl()' id="addBtn">Shorten it</button>
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="basic-addon3">password</span>
<input class="form-control" type="text" value="__PASSWORD__" readonly="true" id="passwordText" aria-describedby="basic-addon3">
</div>
</div>
<div class="card-footer">
<span> <a href="https://github.com/crazypeace/Url-Shorten-Worker/" target="_self">Fork me on GitHub</a> </span>
</div>
</div>
<div class="card shadow m-3">
<h5 class="card-header">LocalStorage List</h5>
<div class="card-body">
<h5 class="card-title"> </h5>
<div class="input-group mb-3">
<button class="btn btn-success" type="button" onclick='loadUrlList()' id="loadListBtn">load localStorage</button>
<button class="btn btn-danger" type="button" onclick='clearLocalStorage()' id="clearlocalStgBtn">clear localStorage</button>
<button class="btn btn-info" type="button" onclick='loadKV()' id="loadKV2localStgBtn">load KV to localStorage</button>
</div>
<div class="card-text">
<div classs="list-group" id="urlList">
<div class="mb-3 list-group-item">
<div class="input-group">
<button type="button" class="btn btn-danger" onclick='deleteShortUrl("4sure")' id="delBtn-4sure">X</button>
<button type="button" class="btn btn-info" onclick='queryVisitCount("4sure")' id="qryCntBtn-4sure">?</button>
<span class="form-control">https://1way.eu.org/4sure</span>
</div>
<div class="form-control">
https://en.y2mate.is/s36/youtube-to-mp3.html
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="resultModal" tabindex="-1" role="dialog" aria-labelledby="resultModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="resultModalLabel">Result</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="result">No result</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" onclick='copyurl("result")' data-bs-toggle="popover" data-bs-placement="bottom" data-bs-content="Copied!">Copy</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
<!-- <script src="https://crazypeace.github.io/Url-Shorten-Worker/main.js" crossorigin="anonymous"></script> -->
<script src="https://cdn.jsdelivr.net/gh/crazypeace/Url-Shorten-Worker/main.js" crossorigin="anonymous"></script>
<script>
// 函数的定义在 main.js 中
buildValueItemFunc = buildValueTxt
</script>
</body>
</html>