|
| 1 | +// 用法详见: https://github.com/smxl/500 |
| 2 | +let body=`<!DOCTYPE html> |
| 3 | +<html lang="zh-CN"> |
| 4 | +<head> |
| 5 | +<meta charset="utf-8" /> |
| 6 | +<meta name="viewport" content="width=device-width,initial-scale=1" /> |
| 7 | +<title>V 视频</title> |
| 8 | +<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" /> |
| 9 | +</head> |
| 10 | +<body> |
| 11 | +<div class="container"> |
| 12 | +<div class="header text-center"><h1><small>Vip 视频 粘贴 解析 播放</small></h1></div> |
| 13 | +<div class="main"> |
| 14 | +<form class="form-horizontal" method="post"> |
| 15 | +<div class="form-group"> |
| 16 | +<label for="api" class="col-sm-2 control-label">选取</label> |
| 17 | +<div class="col-sm-10"> |
| 18 | +<select id="jk" size="1" onchange="fnChange()" class="form-control"> |
| 19 | +<optgroup label="支持搜索"><option value="https://vip.bljiex.com/?v=">BL 解析</option><option value="https://z1.m1907.cn/?jx=">M1907 有广</option></optgroup> |
| 20 | +<optgroup label="备用"><option value="https://okjx.cc/?url=">OK 解析</option></optgroup> |
| 21 | +</select> |
| 22 | +</div> |
| 23 | +</div> |
| 24 | +<div class="form-group"> |
| 25 | +<label for="url" class="col-sm-2 control-label">输入</label> |
| 26 | +<div class="col-sm-10"><input type="url" class="form-control" id="vipurl" placeholder="视频地址" /></div> |
| 27 | +</div> |
| 28 | +<div class="form-group"> |
| 29 | +<div class="col-sm-offset-2 col-sm-10"><button type="button" onclick="onPlay()" class="btn btn-primary">解析</button> <button type="button" onclick="onClear()" class="btn btn-primary">清空</button> <button type="button" onclick="onShare()" class="btn btn-primary">复制</button></div> |
| 30 | +</div></form> |
| 31 | +</div> |
| 32 | +</div> |
| 33 | +<iframe src="" id="play" width="100%" height="50%" frameborder="0" allowfullscreen scrolling="no" style="position:absolute"></iframe> |
| 34 | +<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script> |
| 35 | +<script> |
| 36 | +function init() { |
| 37 | + document.getElementById("jk"); |
| 38 | +} |
| 39 | +init(); |
| 40 | +function fnChange() {} |
| 41 | +function onClear() { |
| 42 | + document.getElementById("vipurl").value = ""; |
| 43 | +} |
| 44 | +function onShare() { |
| 45 | + navigator.clipboard.writeText("https://" + document.domain + "/v.html?vv=" + document.getElementById("vipurl").value) |
| 46 | +} |
| 47 | +function onPlay() { |
| 48 | + var e = document.getElementById("jk"), |
| 49 | + t = e.options[e.selectedIndex].value, |
| 50 | + n = document.getElementById("vipurl").value, |
| 51 | + o = document.getElementById("play"); |
| 52 | + 0 < n.length && (o.src = t + n); |
| 53 | +} |
| 54 | +function getQueryVariable(variable) |
| 55 | +{ |
| 56 | + var query = window.location.search.substring(1); |
| 57 | + var vars = query.split("&"); |
| 58 | + for (var i=0;i<vars.length;i++) { |
| 59 | + var pair = vars[i].split("="); |
| 60 | + if(pair[0] == variable){return pair[1];} |
| 61 | + } |
| 62 | + return(false); |
| 63 | +} |
| 64 | +function vipvideovalue() |
| 65 | +{ |
| 66 | + if (getQueryVariable("vv").length>1) { |
| 67 | + document.getElementById("vipurl").value = getQueryVariable("vv"); |
| 68 | + } else { |
| 69 | + |
| 70 | + } |
| 71 | +} |
| 72 | +vipvideovalue(); |
| 73 | +</script> |
| 74 | +</body> |
| 75 | +</html> |
| 76 | +` |
| 77 | + |
| 78 | +const Status = "HTTP/1.1 200 OK"; |
| 79 | +const Headers = {}; |
| 80 | +const Data = body; |
| 81 | +const Response = { |
| 82 | + status: Status, |
| 83 | + //headers: Headers, // Optional. |
| 84 | + body: Data // Optional. |
| 85 | +}; |
| 86 | + |
| 87 | +$done(Response); |
0 commit comments