-
Notifications
You must be signed in to change notification settings - Fork 24
/
v.html
32 lines (32 loc) · 1.5 KB
/
v.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
<!DOCTYPE html><html lang="en-US"><head><meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Video</title><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" /></head>
<body>
<div class="container">
<h2>V<small>ideo</small></h2>
<form method="post">
<label for="cp" class="col-sm-2 control-label">Choice APIs</label>
<select id="cp" class="form-control">
<option value="https://svip.bljiex.cc/?v=">BL</option>
<option value="https://im1907.top/?jx=">m1907 search</option>
</select>
<input class="form-control" id="url" placeholder="keyword / url" />
<button type="button" onclick="onPlay()" class="btn btn-primary">Play</button>
<button type="button" onclick="onGo()" class="btn btn-primary">Go</button>
</form></div>
<iframe src="" id="vid" width="100%" height="66%" frameborder="0" allowfullscreen scrolling="no" style="position:absolute"></iframe>
<script>
const url = new URL(window.location.href);
const res = url.searchParams.get('url');
function init(){
document.getElementById("url").value=res;onPlay()
}
function onPlay(){
var cp=document.getElementById("cp"),sel=cp.options[cp.selectedIndex].value,url=document.getElementById("url").value,vid=document.getElementById("vid");0<url.length&&(vid.src=sel+url)
}
function onGo(){
var cp=document.getElementById("cp"),sel=cp.options[cp.selectedIndex].value,url=document.getElementById("url").value;0<url.length&&(window.open(sel+url))
}
init();
</script>
</body></html>