mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
rebuilding site Thu Jun 30 11:43:08 AM CST 2022
This commit is contained in:
parent
ce465b53e3
commit
d5e26f165a
228 changed files with 1786 additions and 26411 deletions
12
zh/searchurl/txt/accusoft.html
Normal file
12
zh/searchurl/txt/accusoft.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<script src="https://fastly.jsdelivr.net/npm/@accusoft/pdf-viewer@latest/bundle.js"></script>
|
||||
<div id="viewer"></div>
|
||||
<script>
|
||||
let url = location.search.substring(6);
|
||||
(async () => {
|
||||
const pdfViewer = await window.Accusoft.PdfViewerControl.create({
|
||||
sourceDocument: url,
|
||||
container: document.getElementById('viewer')
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
12
zh/searchurl/txt/checked.js
Normal file
12
zh/searchurl/txt/checked.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
(function(){let d=document;
|
||||
let ea=d.querySelectorAll('input:checked');
|
||||
let s="";
|
||||
for(let i=0;i<ea.length;i++){
|
||||
let sibling = ea[i].nextElementSibling;
|
||||
if(sibling==null) sibling=ea[i].previousElementSibling;
|
||||
let str = sibling.getAttribute("href");
|
||||
if(null==str) str=sibling.getAttribute("src");
|
||||
s = s+str+"\n";
|
||||
}
|
||||
return s;
|
||||
})()
|
1
zh/searchurl/txt/clearfont.css
Normal file
1
zh/searchurl/txt/clearfont.css
Normal file
|
@ -0,0 +1 @@
|
|||
*{font-family:initial!important}
|
7
zh/searchurl/txt/cmds.cfg
Normal file
7
zh/searchurl/txt/cmds.cfg
Normal file
|
@ -0,0 +1,7 @@
|
|||
打开剪贴板链接:clip/uweb:/system/bin/toybox grep -m1 -Eo '(http|https)://[^ "'\'']+'
|
||||
行编辑器:text/html:cat %f|while read LINE; do echo "<a href=\"i:AA${LINE//\"/%22}\">$LINE</a><br>";done
|
||||
代码编辑器:text/html:printf "<style>#div{position:fixed;top:2px}#editor{position: absolute;top:30;right:0;bottom:0;left:0;}#textarea{display:none}</style><script src='http://cdn.bootcss.com/ace/1.4.9/ace.js'></script><script src='http://cdn.bootcss.com/ace/1.4.9/ext-language_tools.js'></script><script src='https://fastly.jsdelivr.net/gh/torappinfo/uwebzh/searchurl/ace.js'></script><div id='div'><button onclick='onSave(\"%f\")'>Save</button> <a href=''>Run</a></div><pre id='editor'></pre><textarea id='textarea'>";cat "%f";
|
||||
淘宝比价:clip/uweb:grep -m1 -Eo '(http|https)://[^ "'\'']+'|curl -s "`cat`"|grep -m1 -Eo '(http|https)://[^ ?]+'|grep -Eo '[0-9]+'|echo "http://tool.manmanbuy.com/historyLowest.aspx?url=https://detail.tmall.com/item.htm?id=`cat`"
|
||||
markdeep:text/html:cat %f;echo "<style class=fallback>body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src=https://casual-effects.com/markdeep/latest/markdeep.min.js charset=utf-8></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility=visible)</script>"
|
||||
显示本地md:text/html:echo "<script src=https://fastly.jsdelivr.net/npm/mdme></script><textarea>";cat %f
|
||||
texme:text/html:echo "<script src=https://fastly.jsdelivr.net/npm/texme></script><textarea>";cat %f
|
6
zh/searchurl/txt/default.rc
Normal file
6
zh/searchurl/txt/default.rc
Normal file
|
@ -0,0 +1,6 @@
|
|||
export LD_LIBRARY_PATH=/data/data/com.termux/files/usr/lib
|
||||
export PATH=/data/data/com.termux/files/usr/bin:/data/data/info.torapp.uweb/files/bin:/system/bin:/system/xbin
|
||||
export HOME=/data/data/com.termux/files/home
|
||||
cd
|
||||
#tcron /sdcard/a "cloud189-go sign;toybox touch /sdcard/a" 24
|
||||
#node Loon/jd_xxl.js
|
51
zh/searchurl/txt/djvu.html
Normal file
51
zh/searchurl/txt/djvu.html
Normal file
|
@ -0,0 +1,51 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<header>
|
||||
<meta charset="utf-8">
|
||||
<script src="https://djvu.js.org/assets/dist/djvu.js"></script>
|
||||
<script src="https://djvu.js.org/assets/dist/djvu_viewer.js"></script>
|
||||
|
||||
<style>
|
||||
#for_viewer {
|
||||
height: 80vh;
|
||||
width: 90vw;
|
||||
margin: 5vh auto;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
</header>
|
||||
|
||||
<body>
|
||||
<div id="for_viewer"></div>
|
||||
<script>
|
||||
// save as a global value
|
||||
window.viewer = new DjVu.Viewer();
|
||||
viewer.render(document.querySelector("#for_viewer"));
|
||||
{
|
||||
//?url=#page=
|
||||
let url = location.search.substring(5);
|
||||
let page = 1;
|
||||
let lhash = location.hash;
|
||||
if(lhash)
|
||||
page = parseInt(lhash.substring(6),10);
|
||||
viewer.loadDocumentByUrl(url,{"pageNumber": page,});
|
||||
}
|
||||
window.addEventListener('hashchange', function() {
|
||||
let page = 1;
|
||||
let lhash = location.hash;
|
||||
if(lhash)
|
||||
page = parseInt(lhash.substring(6),10);
|
||||
viewer.configure({pageNumber: page,});
|
||||
/*
|
||||
viewer.store.dispatch({
|
||||
type: DjVu.Viewer.ActionTypes.SET_NEW_PAGE_NUMBER_ACTION,
|
||||
pageNumber: page,
|
||||
shouldScrollToPage: true,
|
||||
});
|
||||
*/
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
10
zh/searchurl/txt/dplayer.html
Normal file
10
zh/searchurl/txt/dplayer.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<div id="dplayer"></div>
|
||||
<script src="https://fastly.jsdelivr.net/npm/dplayer/dist/DPlayer.min.js"></script>
|
||||
<script>
|
||||
const dp = new DPlayer({
|
||||
container: document.getElementById('dplayer'),
|
||||
video: {
|
||||
url: location.search.substring(3),
|
||||
},
|
||||
});
|
||||
</script>
|
352
zh/searchurl/txt/epub.html
Normal file
352
zh/searchurl/txt/epub.html
Normal file
|
@ -0,0 +1,352 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
|
||||
<title>EPUB</title>
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/jszip/3.1.5/jszip.min.js"></script>
|
||||
<script src="https://fastly.jsdelivr.net/npm/epubjs@0.3.88/dist/epub.min.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const html = document.querySelector('html')
|
||||
let fontSize = window.innerWidth / 10
|
||||
fontSize = fontSize > 50 ? 50 : fontSize
|
||||
html.style.fontSize = fontSize + 'px'
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
* {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.mask {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.meun {
|
||||
display: flex;
|
||||
height: 1rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#toc {
|
||||
flex: 1;
|
||||
z-index: 100;
|
||||
font-size: .3rem;
|
||||
padding-left: .4rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#page {
|
||||
z-index: 100;
|
||||
font-size: .3rem;
|
||||
color: #333;
|
||||
padding-right: 0.4rem;
|
||||
text-align: right;
|
||||
flex: 0 0 .5rem;
|
||||
}
|
||||
|
||||
#load {
|
||||
z-index: 100;
|
||||
font-size: .3rem;
|
||||
color: #333;
|
||||
padding-right: 0.4rem;
|
||||
text-align: right;
|
||||
flex: 0 0 .5rem;
|
||||
}
|
||||
|
||||
#toc-content {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 102;
|
||||
min-width: auto;
|
||||
max-width: 80%;
|
||||
height: 100%;
|
||||
background: white;
|
||||
flex-direction: column
|
||||
}
|
||||
|
||||
#toc-mask {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 101;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(51, 51, 51, .8);
|
||||
}
|
||||
|
||||
.intro {
|
||||
width: 100%;
|
||||
height: 2.4rem;
|
||||
padding: .2rem .4rem;
|
||||
box-sizing: border-box;
|
||||
height: 3rem;
|
||||
display: flex;
|
||||
border-bottom: .1rem solid #f4f4f4;
|
||||
}
|
||||
|
||||
.txt {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
padding: 0 .2rem;
|
||||
font-size: .3rem;
|
||||
}
|
||||
|
||||
#content {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.item {
|
||||
padding: .2rem .4rem;
|
||||
border-bottom: .07rem solid #f4f4f4;
|
||||
font-size: .4rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#open {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
z-index: 100;
|
||||
font-size: .4rem;
|
||||
color: #333;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
|
||||
}
|
||||
|
||||
#open span {
|
||||
padding: .3rem .3rem;
|
||||
border: .05rem solid #333;
|
||||
border-radius: .2rem;
|
||||
}
|
||||
|
||||
.read {
|
||||
display: flex;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
#prev {
|
||||
flex: 0 0 2rem;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
#viewer {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
#next {
|
||||
flex: 0 0 2rem;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.save {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.box {
|
||||
padding: .2rem .2rem;
|
||||
justify-content: center;
|
||||
border-bottom: .1rem solid #f4f4f4;
|
||||
}
|
||||
|
||||
.jump {
|
||||
display: flex;
|
||||
height: 1rem;
|
||||
border-bottom: .1rem solid #f4f4f4;
|
||||
}
|
||||
|
||||
.jump input {
|
||||
flex: 1;
|
||||
padding: .1rem .1rem;
|
||||
margin: .2rem .2rem .2rem .4rem;
|
||||
outline: none;
|
||||
font-size: .3rem;
|
||||
}
|
||||
|
||||
.jump span {
|
||||
flex: 0 0 1rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="ebook">
|
||||
<div class="mask">
|
||||
<div id="open">
|
||||
<span
|
||||
onclick="document.getElementById('input').click();document.getElementById('open').style.display = 'none'">选择本地书籍</span>
|
||||
<input type="file" id="input" style="display: none;">
|
||||
</div>
|
||||
<div class="read">
|
||||
<div id="prev" onclick="rendition.prev()"></div>
|
||||
<div id="viewer"></div>
|
||||
<div id="next" onclick="rendition.next()"></div>
|
||||
</div>
|
||||
<div class="meun">
|
||||
<div id="toc" onclick="showhide()"></div>
|
||||
<div id="page"></div>
|
||||
<div id="load"></div>
|
||||
</div>
|
||||
<div id="toc-mask" style="display: none;" onclick="showhide()"></div>
|
||||
<div id="toc-content" style="display: none;">
|
||||
<div class="intro">
|
||||
<img id="cover">
|
||||
<div style="display: flex;flex: 1;flex-direction: column;overflow-y: auto;">
|
||||
<div id="title" class="txt"></div>
|
||||
<div id="author" class="txt"></div>
|
||||
<div id="publisher" class="txt"></div>
|
||||
<div id="pubdate" class="txt"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="save">
|
||||
<div class="txt box" onclick="save()">存档</div>
|
||||
<div class="txt box" onclick="get()">读档</div>
|
||||
<div class="txt box" onclick="del()">删档</div>
|
||||
</div>
|
||||
<div class="jump">
|
||||
<input id="jump" type="number" placeholder="0-1之间的数字,如0.25"
|
||||
oninput="if(value>1)value=1;if(value<0)value=0">
|
||||
<span class="txt" onclick="jump()">跳转</span>
|
||||
</div>
|
||||
<div id="content"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
let url = location.search.substring(3);
|
||||
if (url !== "") {
|
||||
var book = ePub(url);
|
||||
document.getElementById("open").style.display = "none"
|
||||
} else {
|
||||
var book = ePub();
|
||||
var inputElement = document.getElementById("input");
|
||||
inputElement.addEventListener('change', function (e) {
|
||||
var file = e.target.files[0];
|
||||
if (window.FileReader) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = openBook;
|
||||
reader.readAsArrayBuffer(file);
|
||||
}
|
||||
});
|
||||
function openBook(e) {
|
||||
var bookData = e.target.result;
|
||||
book.open(bookData, "binary");
|
||||
}
|
||||
}
|
||||
//渲染
|
||||
var rendition = book.renderTo("ebook", {
|
||||
with: window.innerWidth,
|
||||
height: window.innerHeight - 20
|
||||
});
|
||||
rendition.display();
|
||||
|
||||
book.ready
|
||||
.then(() => {
|
||||
var local = localStorage.getItem(book.key() + '-locations');
|
||||
if (local) {
|
||||
return book.locations.load(local);
|
||||
} else {
|
||||
return book.locations.generate();
|
||||
}
|
||||
})
|
||||
.then(locations => {
|
||||
localStorage.setItem(book.key() + '-locations', book.locations.save());
|
||||
})
|
||||
|
||||
// 目录
|
||||
book.loaded.navigation.then(toc => {
|
||||
var read = localStorage.getItem(book.key() + '-read');
|
||||
if (read) {
|
||||
rendition.display(read);
|
||||
}
|
||||
var $content = document.getElementById("content");
|
||||
toc.forEach(item => {
|
||||
var div = document.createElement("div");
|
||||
div.className = "item";
|
||||
div.textContent = item.label;
|
||||
div.addEventListener("click", () => {
|
||||
rendition.display(item.href);
|
||||
showhide()
|
||||
});
|
||||
$content.appendChild(div)
|
||||
})
|
||||
})
|
||||
//简介
|
||||
book.loaded.metadata.then(meta => {
|
||||
var $title = document.getElementById("title");
|
||||
var $author = document.getElementById("author");
|
||||
var $cover = document.getElementById("cover");
|
||||
var $publisher = document.getElementById("publisher");
|
||||
var $pubdate = document.getElementById("pubdate");
|
||||
$title.textContent = `书名:${meta.title}`;
|
||||
$author.textContent = `作者:${meta.creator}`;
|
||||
$publisher.textContent = `出版社:${meta.publisher}`;
|
||||
$pubdate.textContent = `时间:${meta.pubdate}`;
|
||||
if (book.archive) {
|
||||
book.archive.createUrl(book.cover)
|
||||
.then(url => {
|
||||
$cover.src = url;
|
||||
})
|
||||
} else {
|
||||
$cover.src = book.cover;
|
||||
}
|
||||
});
|
||||
//进度显示
|
||||
rendition.on('relocated', location => {
|
||||
var percent = book.locations.percentageFromCfi(location.start.cfi);
|
||||
var $page = document.getElementById("page");
|
||||
var $load = document.getElementById("load");
|
||||
$page.textContent = location.end.displayed.page + '/' + location.end.displayed.total;
|
||||
$load.textContent = Math.fround(percent * 100).toFixed(1) + '%';
|
||||
})
|
||||
//章节名显示
|
||||
rendition.on("rendered", section => {
|
||||
var $toc = document.getElementById("toc");
|
||||
$toc.textContent = "目录";
|
||||
$toc.textContent = book.navigation.get(section.href).label;
|
||||
})
|
||||
function showhide() {
|
||||
var $toc_content = document.getElementById("toc-content")
|
||||
var $mask = document.getElementById("toc-mask")
|
||||
if ($toc_content.style.display == "none") {
|
||||
$toc_content.style.display = ""
|
||||
$mask.style.display = ""
|
||||
} else {
|
||||
$toc_content.style.display = "none"
|
||||
$mask.style.display = "none"
|
||||
}
|
||||
}
|
||||
function jump() {
|
||||
$jump = document.getElementById("jump").value;
|
||||
rendition.display(book.locations.cfiFromPercentage($jump));
|
||||
showhide();
|
||||
document.getElementById("jump").value = "";
|
||||
}
|
||||
function save() {
|
||||
localStorage.setItem(book.key() + '-read', rendition.currentLocation().start.cfi)
|
||||
showhide()
|
||||
}
|
||||
function get() {
|
||||
rendition.display(localStorage.getItem(book.key() + '-read'));
|
||||
showhide()
|
||||
}
|
||||
function del() {
|
||||
localStorage.removeItem(book.key() + '-read');
|
||||
showhide()
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
6
zh/searchurl/txt/filecap.cfg
Normal file
6
zh/searchurl/txt/filecap.cfg
Normal file
|
@ -0,0 +1,6 @@
|
|||
pdf:uweb:echo file:///sdcard/uweb/app/pdfviewer.html?file=%u#page=1
|
||||
djvu:uweb:echo file:///sdcard/uweb/app/djvu.html?url=%u#page=1
|
||||
epub:uweb:echo file:///sdcard/uweb/app/epub.html?u=%u
|
||||
txt:uweb:echo file:///sdcard/uweb/app/txtview.html?url=%u#page=1
|
||||
md.html:uweb:echo file:///sdcard/uweb/app/markdeep.html?url=%u#page=1
|
||||
py:termux/*:python %f;exit -1
|
1
zh/searchurl/txt/filecap_css.cfg
Normal file
1
zh/searchurl/txt/filecap_css.cfg
Normal file
|
@ -0,0 +1 @@
|
|||
css:uweb:echo " {let n='%f';let d=document;let uc=d.getElementById(n);let c=uc;if(null==c){ c=d.createElement('style');c.type='text/css';c.setAttribute('id', n);}c.innerHTML=\`";cat "%f";echo "\`;if(null==uc)d.head.appendChild(c);}"
|
4
zh/searchurl/txt/filecap_video.cfg
Normal file
4
zh/searchurl/txt/filecap_video.cfg
Normal file
|
@ -0,0 +1,4 @@
|
|||
mp3:text/html:echo '<audio controls width=100% height=100%><source src="%u"></audio>'
|
||||
m4b:text/html:echo '<audio controls width=100% height=100%><source src="%u"></audio>'
|
||||
mp4:text/html:echo '<video controls width=100% height=100%><source src="%u"></video>'
|
||||
mkv:text/html:echo '<video controls width=100% height=100%><source src="%u"></video>'
|
6
zh/searchurl/txt/link.cfg
Normal file
6
zh/searchurl/txt/link.cfg
Normal file
|
@ -0,0 +1,6 @@
|
|||
cookie延期::0000
|
||||
地址栏内容至输入框:i:56%s
|
||||
地址栏_删除非英文: location.href="i:15"+"%s".replace(/[^\u0000-\u007f]/g,"")
|
||||
地址栏_保留中英文: location.href="i:15"+"%s".replace(/[^\u4e00-\u9fa5\u0000-\u007f]/g,"")
|
||||
站内搜索: location.href="i:15site:"+location.hostname+" "+"%s"
|
||||
seedr离线:https://www.seedr.cc/files {let sdi=setInterval(function(){if($('#upload-button').css("display")!="none"){clearInterval(sdi);setTimeout(function(){$(':text[name="link"]').val("%u");$('#upload-button').click();},500);}},500)}
|
22
zh/searchurl/txt/magnet.search
Normal file
22
zh/searchurl/txt/magnet.search
Normal file
|
@ -0,0 +1,22 @@
|
|||
磁力搜索:http://www.btmovi.space/
|
||||
磁力云搜索:http://www.eclyun.com/
|
||||
磁力星:https://www.cilixing.pw/
|
||||
skrbt:https://skrbtcili.buzz/
|
||||
磁力站:http://cili001.com/
|
||||
哔哩搜索:https://biliworld.xyz/
|
||||
bt1207:https://bt1207cl.icu/
|
||||
磁力蜘蛛:http://www.eclzz.com/
|
||||
Acg搜索:http://www.acgsou.com/
|
||||
种子搜:https://www.dongxingdi.com/
|
||||
燕子bt:https://www.54new.com/
|
||||
bthub:https://bthub.xyz/
|
||||
磁力天堂:http://www.cltt.me/
|
||||
磁力宝:http://www.clb.biz/
|
||||
搜bt磁力:http://www.sobt5.pw/
|
||||
bt磁力车:http://5i0.fun/6qPP
|
||||
种子搜:https://www.zhongzihu.com/
|
||||
高清MP4吧:http://www.mp4ba.com
|
||||
Bt电影天堂:http://www.btbtdy.me
|
||||
高清电影网:http://gaoqing.la
|
||||
两个BT:https://www.bttwo.com/
|
||||
磁力搜索:http://www.cilil.cn/
|
1
zh/searchurl/txt/margintop.css
Normal file
1
zh/searchurl/txt/margintop.css
Normal file
|
@ -0,0 +1 @@
|
|||
html{margin-top:30px !important}
|
94
zh/searchurl/txt/markdeep.html
Normal file
94
zh/searchurl/txt/markdeep.html
Normal file
|
@ -0,0 +1,94 @@
|
|||
<head>
|
||||
<script>window.markdeepOptions = {mode: 'script'};</script>
|
||||
<script src="https://morgan3d.github.io/markdeep/latest/markdeep.min.js"></script>
|
||||
<script id="MathJax-script" async src="https://fastly.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
||||
<script>
|
||||
function absFile(url) {
|
||||
this.name=url;
|
||||
this.slice = async(offset, length) =>{
|
||||
const headers = new Headers();
|
||||
headers.append('range', 'bytes=' + offset + '-' + ( offset + length -1).toString());
|
||||
|
||||
const opts = {
|
||||
credentials: 'include',
|
||||
headers : headers
|
||||
};
|
||||
|
||||
const resp = await fetch( this.name, opts );
|
||||
return await resp.arrayBuffer();
|
||||
//alert(JSON.stringify(resp.headers));
|
||||
//return await resp.text();
|
||||
}
|
||||
}
|
||||
|
||||
var file;
|
||||
var blocksize = 1024;
|
||||
function loadSlice(){
|
||||
function render(u8array){
|
||||
document.body.innerHTML = window.markdeep.format(new TextDecoder().decode(u8array),true);
|
||||
MathJax.typesetPromise();
|
||||
}
|
||||
function setPageUrl(pageurl){
|
||||
let a = document.createElement('a');
|
||||
a.href = "i:5c"+pageurl;
|
||||
a.click();
|
||||
}
|
||||
|
||||
var url;
|
||||
var page = 1;
|
||||
var extrasize = blocksize; //extrasize should <= blocksize
|
||||
let lhash = location.hash;
|
||||
if(lhash){
|
||||
if("p"!==lhash.charAt(1)){//#offset=&[len]
|
||||
let iAmpersand = lhash.indexOf('&',8);
|
||||
let offset = parseInt(lhash.substring(8,iAmpersand));
|
||||
let len = parseInt(lhash.substring(iAmpersand+1));
|
||||
{//update urlInc() url
|
||||
let href = location.href;
|
||||
let iHash = href.indexOf('#');
|
||||
href=href.substring(0,iHash)+"#page="+Math.floor((offset+len)/blocksize);
|
||||
setPageUrl(href);
|
||||
}
|
||||
file.slice(offset,len).then((buffer)=>{
|
||||
let u8 = new Uint8Array(buffer);
|
||||
render(u8);
|
||||
});
|
||||
return;
|
||||
}
|
||||
//#page=
|
||||
page = parseInt(lhash.substring(6));
|
||||
}else
|
||||
setPageUrl(location.href+"#page=1");
|
||||
file.slice(blocksize*(page-1),blocksize+extrasize).then((buffer)=>{
|
||||
let u8 = new Uint8Array(buffer);
|
||||
let u8len = u8.length;
|
||||
let iStart = 0;
|
||||
let limit = Math.min(u8len,extrasize);
|
||||
if(1!=page){
|
||||
for(let i=1;i<limit;i=i+2){
|
||||
if(10==u8[i] && 10==u8[i-1]) {
|
||||
iStart = i+1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
let iEnd = Math.min(u8len,blocksize);
|
||||
limit = Math.min(u8len,blocksize+extrasize);
|
||||
for(let i=blocksize+1;i<limit;i=i+2){
|
||||
if(10==u8[i] && 10==u8[i-1]) {
|
||||
iEnd = i+1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
render(u8.slice(iStart,iEnd));
|
||||
});
|
||||
|
||||
}
|
||||
//?url=#offset=&[len]&page=
|
||||
file = new absFile(location.search.substring(5));
|
||||
window.addEventListener('hashchange',loadSlice);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<script>loadSlice();</script>
|
||||
</body>
|
181
zh/searchurl/txt/mdict.html
Normal file
181
zh/searchurl/txt/mdict.html
Normal file
|
@ -0,0 +1,181 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<base href="https://fastly.jsdelivr.net/gh/fengdh/mdict-js/">
|
||||
<title>mdict</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" type="text/css" href="selectize.default.css" media="screen">
|
||||
<style>
|
||||
#btnLookup {
|
||||
border: none;
|
||||
height: 36px;
|
||||
font-size: 12pt;
|
||||
font-weight: bold;
|
||||
vertical-align: top;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
#btnLookup:not([disabled]) {
|
||||
background: #1A4FDD;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#dict-title {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
max-width: 300px;
|
||||
font-size: 10px;
|
||||
opacity: 0.9;
|
||||
background: #DDD;
|
||||
box-shadow: -2px -2px 4px 4px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
#dict-title * {
|
||||
font-size: 10px!important;
|
||||
}
|
||||
|
||||
#mdict-online-viewer {
|
||||
font-size: 14px;
|
||||
font-family: "Georgia", "Times New Roman";
|
||||
height: 600px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#mdict-online-viewer #definition {
|
||||
font-size: 14px;
|
||||
height: 500px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#word + .selectize-control {
|
||||
display: inline-block;
|
||||
min-width: 18em;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript" src="conf.js"></script>
|
||||
<script src="require.js" data-main="mdict"></script>
|
||||
</head>
|
||||
<body>
|
||||
<section class="main-content">
|
||||
|
||||
<div id="mdict-online-viewer">
|
||||
Choose a dictionary file (*.mdx + optional *.mdd): <input id="dictfile" type="file" multiple>
|
||||
<p>
|
||||
<input id="word" type="text" value="">
|
||||
<input id="btnLookup" type="button" value="look up" disabled="false">
|
||||
|
||||
<div id="dict-title"></div>
|
||||
<div id="definition">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<script>
|
||||
function AbstractFile(url) {
|
||||
this.name=url;
|
||||
this.slice = async(offset, length) =>{
|
||||
const headers = new Headers();
|
||||
headers.append( 'Range', 'bytes=' + offset + '-' + ( offset + length ).toString() );
|
||||
|
||||
const opts = {
|
||||
credentials: 'include',
|
||||
headers : headers
|
||||
};
|
||||
|
||||
const resp = await fetch( this.name, opts );
|
||||
alert(resp.type);
|
||||
return await resp.blob();
|
||||
}
|
||||
}
|
||||
//?url=#word=
|
||||
let url = location.search.substring(5);
|
||||
let word = location.hash.substring(6);
|
||||
var fileList = [new AbstractFile(url)];
|
||||
|
||||
var mdict;
|
||||
define('mdict-parseXml', function() {
|
||||
return function (str) {
|
||||
return (new DOMParser()).parseFromString(str, 'text/xml');
|
||||
}
|
||||
});
|
||||
|
||||
require(['jquery', 'mdict-common', 'mdict-parser', 'mdict-renderer', 'selectize'], function($, MCommon, MParser, MRenderer, Selectize) {
|
||||
$('#btnLookup').addClass('stripes');
|
||||
$('#word').on('keyup', function(e) { e.which === 13 && $('#btnLookup').click(); });
|
||||
MParser(fileList).then(function(resources) {
|
||||
mdict = MRenderer(resources);
|
||||
|
||||
function doSearch(phrase, offset) {
|
||||
console.log(phrase + '');
|
||||
mdict.lookup(phrase, offset).then(function($content) {
|
||||
$('#definition').empty().append($content.contents());
|
||||
console.log('--');
|
||||
});
|
||||
}
|
||||
|
||||
$('#dict-title').html((resources['mdx'] || resources['mdd']).value().description || '** no description **');
|
||||
mdict.render($('#dict-title'));
|
||||
|
||||
$('#btnLookup')
|
||||
.attr('disabled', false)
|
||||
.off('.#mdict')
|
||||
.on('click.#mdict', function() {
|
||||
doSearch($('#word').val());
|
||||
}).click();
|
||||
$('#word')[0].selectize.destroy();
|
||||
|
||||
$('#word').selectize({
|
||||
plugins: ['restore_on_backspace'],
|
||||
maxItems: 1,
|
||||
maxOptions: 1 << 20,
|
||||
valueField: 'value',
|
||||
labelField: 'word',
|
||||
searchField: 'word',
|
||||
delimiter: '~~',
|
||||
loadThrottle: 10,
|
||||
create: function(v, callback) {
|
||||
return callback({word: v, value: v});
|
||||
},
|
||||
createOnBlur: true,
|
||||
closeAfterSelect: true,
|
||||
allowEmptyOption: true,
|
||||
score: function(search) {
|
||||
var score = this.getScoreFunction(search);
|
||||
return function(item) {return 1;};
|
||||
},
|
||||
load: function(query, callback) {
|
||||
var self = this;
|
||||
if (!query.length) {
|
||||
this.clearOptions();
|
||||
this.refreshOptions();
|
||||
return;
|
||||
};
|
||||
mdict.search({phrase: query, max: 5000}).then(function(list) {
|
||||
// console.log(list.join(', '));
|
||||
// TODO: filter candidate keyword starting with "_"
|
||||
list = list.map(function(v) {
|
||||
return {word: v, value: v.offset};
|
||||
});
|
||||
self.clearOptions();
|
||||
callback(list);
|
||||
});
|
||||
},
|
||||
onChange: function(value) {
|
||||
var item = this.options[value];
|
||||
if (item) {
|
||||
var value = item.word;
|
||||
doSearch(value, value.offset);
|
||||
$('#word').val(value);
|
||||
} else {
|
||||
$('#definition').empty();
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
573
zh/searchurl/txt/nav.cfg
Normal file
573
zh/searchurl/txt/nav.cfg
Normal file
|
@ -0,0 +1,573 @@
|
|||
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title></title>
|
||||
<style>
|
||||
.tab {
|
||||
overflow: hidden;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
/* Style the buttons that are used to open the tab content */
|
||||
.tab button {
|
||||
background-color: inherit;
|
||||
float: left;
|
||||
border: none;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
padding: 14px 16px;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
/* Change background color of buttons on hover */
|
||||
.tab button:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
/* Create an active/current tablink class */
|
||||
.tab button.active {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
/* Style the tab content */
|
||||
.tabcontent {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tabcontent ul{line-height:32px;padding:0;list-style:none;overflow:hidden;border-bottom:1px solid #eaeaea}
|
||||
.tabcontent ul:last-child{border-bottom:none}
|
||||
.tabcontent li{width:25%;float:left;display:inline-flex;white-space:nowrap;justify-content:center;overflow:hidden}
|
||||
.tabcontent li:first-child{color:#999}
|
||||
.tabcontent a{color:inherit;text-decoration:inherit;}
|
||||
</style>
|
||||
<script>
|
||||
function openTab(evt, tabName) {
|
||||
var i, tabcontent, tablinks;
|
||||
var d=document;
|
||||
// Get all elements with class="tabcontent" and hide them
|
||||
tabcontent = d.getElementsByClassName("tabcontent");
|
||||
for (i = 0; i < tabcontent.length; i++) {
|
||||
tabcontent[i].style.display = "none";
|
||||
}
|
||||
|
||||
// Get all elements with class="tablinks" and remove the class "active"
|
||||
tablinks = d.getElementsByClassName("tablinks");
|
||||
for (i = 0; i < tablinks.length; i++) {
|
||||
tablinks[i].className = tablinks[i].className.replace(" active", "");
|
||||
}
|
||||
|
||||
// Show the current tab, and add an "active" class to the button that opened the tab
|
||||
d.getElementById(tabName).style.display = "block";
|
||||
evt.currentTarget.className += " active";
|
||||
}
|
||||
</script>
|
||||
</head><body>
|
||||
|
||||
<div class="tab">
|
||||
<button class="tablinks" onclick="openTab(event, '常用')">常用</button>
|
||||
<button class="tablinks" onclick="openTab(event, '娱乐')">娱乐</button>
|
||||
<button class="tablinks" onclick="openTab(event, '生活')">生活</button>
|
||||
<button class="tablinks" onclick="openTab(event, '学习')">学习</button>
|
||||
<button class="tablinks" onclick="openTab(event, '设计')">设计</button>
|
||||
<button class="tablinks" onclick="openTab(event, '技术')">技术</button>
|
||||
</div>
|
||||
<div id="常用" class="tabcontent">
|
||||
<ul>
|
||||
<li>热门</li>
|
||||
<li><a href="https://www.sogou.com/">搜狗</a></li>
|
||||
<li><a href="https://www.toutiao.com/">今日头条</a></li>
|
||||
<li><a href="https://jandan.net/">煎蛋</a></li>
|
||||
<li><a href="http://www.dgtle.com/">数字尾巴</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>社交</li>
|
||||
<li><a href="https://www.weibo.com/">微博</a></li>
|
||||
<li><a href="https://tieba.baidu.com/">贴吧</a></li>
|
||||
<li><a href="https://www.zhihu.com/">知乎</a></li>
|
||||
<li><a href="https://www.douban.com/">豆瓣</a></li>
|
||||
<li><a href="https://www.v2ex.com/">V2EX</a></li>
|
||||
<li><a href="https://www.jianshu.com/">简书</a></li>
|
||||
<li><a href="https://twitter.com/">Twitter</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>资讯</li>
|
||||
<li><a href="https://www.163.com/">网易</a></li>
|
||||
<li><a href="http://www.qq.com/">腾讯</a></li>
|
||||
<li><a href="http://www.sina.com.cn/">新浪</a></li>
|
||||
<li><a href="http://www.sohu.com/">搜狐</a></li>
|
||||
<li><a href="http://www.ifeng.com/">凤凰网</a></li>
|
||||
<li><a href="http://www.people.com.cn/">人民网</a></li>
|
||||
<li><a href="http://xinhuanet.com/">新华网</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>购物</li>
|
||||
<li><a href="https://www.taobao.com/">淘宝</a></li>
|
||||
<li><a href="https://www.jd.com/">京东</a></li>
|
||||
<li><a href="https://www.amazon.cn/">亚马逊</a></li>
|
||||
<li><a href="https://www.suning.com/">苏宁易购</a></li>
|
||||
<li><a href="https://you.163.com/">网易严选</a></li>
|
||||
<li><a href="https://www.smzdm.com/">什么值得买</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>视频</li>
|
||||
<li><a href="https://www.youku.com/">优酷</a></li>
|
||||
<li><a href="https://www.iqiyi.com/">爱奇艺</a></li>
|
||||
<li><a href="https://v.qq.com/">腾讯视频</a></li>
|
||||
<li><a href="https://www.bilibili.com/">哔哩哔哩</a></li>
|
||||
<li><a href="https://www.youtube.com/">YouTube</a></li>
|
||||
<li><a href="https://www.douyu.com/">斗鱼直播</a></li>
|
||||
<li><a href="https://www.huya.com/">虎牙直播</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>工作</li>
|
||||
<li><a href="https://cn.linkedin.com/">领英</a></li>
|
||||
<li><a href="https://www.lagou.com/">拉勾网</a></li>
|
||||
<li><a href="https://www.zhaopin.com/">智联招聘</a></li>
|
||||
<li><a href="https://www.51job.com/">前程无忧</a></li>
|
||||
<li><a href="http://www.yingjiesheng.com/">应届生</a></li>
|
||||
<li><a href="https://maimai.cn/">脉脉</a></li>
|
||||
<li><a href="https://www.v2ex.com/?tab=jobs">酷工作</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>生活</li>
|
||||
<li><a href="https://www.meituan.com/">美团</a></li>
|
||||
<li><a href="https://www.dianping.com/">大众点评</a></li>
|
||||
<li><a href="https://www.ctrip.com/">携程</a></li>
|
||||
<li><a href="https://www.qunar.com/">去哪儿</a></li>
|
||||
<li><a href="https://www.alitrip.com/">飞猪</a></li>
|
||||
<li><a href="https://kyfw.12306.cn/otn/index/init">12306</a></li>
|
||||
<li><a href="https://www.mafengwo.cn/">马蜂窝</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>便捷</li>
|
||||
<li><a href="https://fanyi.baidu.com/">词典翻译</a></li>
|
||||
<li><a href="http://www.weather.com.cn/live/">天气预报</a></li>
|
||||
<li><a href="https://www.kuaidi100.com/">快递查询</a></li>
|
||||
<li><a href="https://cn.office-converter.com/">在线转换</a></li>
|
||||
<li><a href="https://send.firefox.com/">临时网盘</a></li>
|
||||
<li><a href="https://wx.qq.com/">网页微信</a></li>
|
||||
<li><a href="https://mail.qq.com/">QQ邮箱</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<div id="娱乐" class="tabcontent">
|
||||
<ul>
|
||||
<li>发现</li>
|
||||
<li><a href="https://jandan.net/">煎蛋</a></li>
|
||||
<li><a href="https://www.guokr.com/">果壳网</a></li>
|
||||
<li><a href="https://www.duitang.com/">堆糖</a></li>
|
||||
<li><a href="https://www.qiushibaike.com/">糗事百科</a></li>
|
||||
<li><a href="http://baozou.com/">暴走漫画</a></li>
|
||||
<li><a href="http://www.budejie.com/">百思不得姐</a></li>
|
||||
<li><a href="http://www.qdaily.com/">好奇心日报</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>影视</li>
|
||||
<li><a href="https://www.youku.com/">优酷</a></li>
|
||||
<li><a href="https://www.iqiyi.com/">爱奇艺</a></li>
|
||||
<li><a href="https://v.qq.com/">腾讯视频</a></li>
|
||||
<li><a href="http://www.le.com/">乐视视频</a></li>
|
||||
<li><a href="https://www.mgtv.com/">芒果TV</a></li>
|
||||
<li><a href="http://tv.cctv.com/">央视网</a></li>
|
||||
<li><a href="https://www.youtube.com/">YouTube</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>直播</li>
|
||||
<li><a href="https://www.douyu.com/">斗鱼直播</a></li>
|
||||
<li><a href="https://www.yy.com/">YY直播</a></li>
|
||||
<li><a href="https://www.huya.com/">虎牙直播</a></li>
|
||||
<li><a href="http://www.huajiao.com/">花椒直播</a></li>
|
||||
<li><a href="https://egame.qq.com/">企鹅电竞</a></li>
|
||||
<li><a href="https://www.yizhibo.com/">一直播</a></li>
|
||||
<li><a href="https://www.twitch.tv/">Twitch</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>动漫</li>
|
||||
<li><a href="https://www.bilibili.com/">哔哩哔哩</a></li>
|
||||
<li><a href="http://www.acfun.cn/">AcFun</a></li>
|
||||
<li><a href="http://www.dilidili.name/">嘀哩嘀哩</a></li>
|
||||
<li><a href="https://bcy.net/">半次元</a></li>
|
||||
<li><a href="https://manhua.163.com/">网易漫画</a></li>
|
||||
<li><a href="http://u17.com/">有妖气</a></li>
|
||||
<li><a href="https://zh.moegirl.org/">萌娘百科</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>游戏</li>
|
||||
<li><a href="https://store.steampowered.com/">Steam</a></li>
|
||||
<li><a href="http://www.gamersky.com/">游民星空</a></li>
|
||||
<li><a href="http://www.tgbus.com/">口袋巴士</a></li>
|
||||
<li><a href="https://www.17173.com/">17173</a></li>
|
||||
<li><a href="http://www.duowan.com/">多玩游戏</a></li>
|
||||
<li><a href="https://www.3dmgame.com/">3DMGAME</a></li>
|
||||
<li><a href="http://www.66rpg.com/">橙光游戏</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>音乐</li>
|
||||
<li><a href="https://music.163.com/">网易云音乐</a></li>
|
||||
<li><a href="https://www.xiami.com/">虾米音乐</a></li>
|
||||
<li><a href="https://y.qq.com/">QQ音乐</a></li>
|
||||
<li><a href="https://douban.fm/">豆瓣FM</a></li>
|
||||
<li><a href="https://www.ximalaya.com/">喜马拉雅FM</a></li>
|
||||
<li><a href="http://www.yinyuetai.com/">音悦Tai</a></li>
|
||||
<li><a href="http://5sing.kugou.com/">5sing原创</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>体育</li>
|
||||
<li><a href="http://sports.qq.com/">腾讯体育</a></li>
|
||||
<li><a href="http://sports.163.com/">网易体育</a></li>
|
||||
<li><a href="http://sports.sina.com.cn/">新浪体育</a></li>
|
||||
<li><a href="http://sports.cctv.com/">央视体育</a></li>
|
||||
<li><a href="http://www.lesports.com/">乐视体育</a></li>
|
||||
<li><a href="https://www.zhibo8.cc/">直播吧</a></li>
|
||||
<li><a href="https://www.hupu.com/">虎扑</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>小说</li>
|
||||
<li><a href="https://www.qidian.com/">起点中文网</a></li>
|
||||
<li><a href="http://www.zongheng.com/">纵横中文网</a></li>
|
||||
<li><a href="https://www.hongxiu.com/">红袖添香</a></li>
|
||||
<li><a href="https://read.douban.com/">豆瓣阅读</a></li>
|
||||
<li><a href="http://yuedu.163.com/">网易云阅读</a></li>
|
||||
<li><a href="http://www.jingyu.com/">鲸鱼阅读</a></li>
|
||||
<li><a href="http://pianke.me/">片刻</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<div id="生活" class="tabcontent">
|
||||
<ul>
|
||||
<li>出行</li>
|
||||
<li><a href="https://www.meituan.com/">美团</a></li>
|
||||
<li><a href="https://www.ctrip.com/">携程</a></li>
|
||||
<li><a href="https://www.qunar.com/">去哪儿</a></li>
|
||||
<li><a href="https://www.alitrip.com/">飞猪</a></li>
|
||||
<li><a href="http://www.tuniu.com/">途牛</a></li>
|
||||
<li><a href="https://kyfw.12306.cn/otn/index/init">12306</a></li>
|
||||
<li><a href="https://www.mafengwo.cn/">马蜂窝</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>美食</li>
|
||||
<li><a href="http://www.xiachufang.com/">下厨房</a></li>
|
||||
<li><a href="https://www.meishichina.com/">美食天下</a></li>
|
||||
<li><a href="https://www.douguo.com/">豆果美食</a></li>
|
||||
<li><a href="http://chihe.sohu.com/">搜狐美食</a></li>
|
||||
<li><a href="https://www.xinshipu.com/">心食谱</a></li>
|
||||
<li><a href="http://www.chinacaipu.com/">中华菜谱网</a></li>
|
||||
<li><a href="http://www.meishij.net/">美食杰</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>房产</li>
|
||||
<li><a href="http://www.fang.com/">房天下</a></li>
|
||||
<li><a href="http://www.lianjia.com/">链家</a></li>
|
||||
<li><a href="http://www.fangdd.com/">房多多</a></li>
|
||||
<li><a href="http://www.anjuke.com/">安居客</a></li>
|
||||
<li><a href="http://house.qq.com/">腾讯房产</a></li>
|
||||
<li><a href="https://house.focus.cn/">搜狐焦点</a></li>
|
||||
<li><a href="http://www.leju.com/">乐居</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>汽车</li>
|
||||
<li><a href="http://www.autohome.com.cn/">汽车之家</a></li>
|
||||
<li><a href="http://www.pcauto.com.cn/">太平洋汽车</a></li>
|
||||
<li><a href="http://www.bitauto.com/">易车网</a></li>
|
||||
<li><a href="http://www.xcar.com.cn/">爱卡汽车</a></li>
|
||||
<li><a href="http://auto.163.com/">网易汽车</a></li>
|
||||
<li><a href="http://auto.sina.com.cn/">新浪汽车</a></li>
|
||||
<li><a href="http://auto.sohu.com/">搜狐汽车</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>财经</li>
|
||||
<li><a href="http://www.eastmoney.com/">东方财富</a></li>
|
||||
<li><a href="http://www.yicai.com/">第一财经</a></li>
|
||||
<li><a href="http://finance.ifeng.com/">凤凰财经</a></li>
|
||||
<li><a href="http://money.163.com/">网易财经</a></li>
|
||||
<li><a href="http://www.hexun.com/">和讯财经</a></li>
|
||||
<li><a href="https://xueqiu.com/">雪球</a></li>
|
||||
<li><a href="http://guba.eastmoney.com/">股吧</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>时尚</li>
|
||||
<li><a href="https://www.pclady.com.cn/">太平洋时尚</a></li>
|
||||
<li><a href="http://www.rayli.com.cn/">瑞丽网</a></li>
|
||||
<li><a href="http://www.meilishuo.com/">美丽说</a></li>
|
||||
<li><a href="http://www.mogujie.com/">蘑菇街</a></li>
|
||||
<li><a href="http://www.yoka.com/">YOKA</a></li>
|
||||
<li><a href="http://www.onlylady.com/">OnlyLady</a></li>
|
||||
<li><a href="http://www.vogue.com.cn/">VOGUE</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>健康</li>
|
||||
<li><a href="http://health.sohu.com/">搜狐健康</a></li>
|
||||
<li><a href="http://health.sina.com.cn/">新浪健康</a></li>
|
||||
<li><a href="http://fashion.ifeng.com/health/">凤凰健康</a></li>
|
||||
<li><a href="http://www.xywy.com/">寻医问药</a></li>
|
||||
<li><a href="http://www.dxy.cn/">丁香园</a></li>
|
||||
<li><a href="http://www.39.net/">39健康网</a></li>
|
||||
<li><a href="http://www.120ask.com/">有问必答</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>查询</li>
|
||||
<li><a href="http://www.speedtest.net/">网速测试</a></li>
|
||||
<li><a href="http://www.114best.com/dh/">电话归属地</a></li>
|
||||
<li><a href="http://qq.ip138.com/train/">列车时刻</a></li>
|
||||
<li><a href="http://map.variflight.com/">实时航班</a></li>
|
||||
<li><a href="http://typhoon.zjwater.gov.cn/">台风路径</a></li>
|
||||
<li><a href="http://www.ip138.com/weizhang.htm">交通违章查询</a></li>
|
||||
<li><a href="http://www.b1bj.com/">比一比价</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<div id="学习" class="tabcontent">
|
||||
<ul>
|
||||
<li>课程</li>
|
||||
<li><a href="https://open.163.com/">网易公开课</a></li>
|
||||
<li><a href="https://study.163.com/">网易云课堂</a></li>
|
||||
<li><a href="https://ke.qq.com/">腾讯课堂</a></li>
|
||||
<li><a href="https://www.icourse163.org/">中国大学MOOC</a></li>
|
||||
<li><a href="https://www.imooc.com/">慕课网</a></li>
|
||||
<li><a href="http://www.jikexueyuan.com/">极客学院</a></li>
|
||||
<li><a href="http://www.icourses.cn/">爱课程</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>文库</li>
|
||||
<li><a href="https://wenku.baidu.com/">百度文库</a></li>
|
||||
<li><a href="http://www.doc88.com/">道客巴巴</a></li>
|
||||
<li><a href="http://www.docin.com/">豆丁网</a></li>
|
||||
<li><a href="http://ishare.iask.sina.com.cn/">爱问共享资料</a></li>
|
||||
<li><a href="http://www.360doc.com/">360doc</a></li>
|
||||
<li><a href="https://wenku.lingfengyun.com/">凌风云文库</a></li>
|
||||
<li><a href="http://www.mbalib.com/">MBA智库</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>学术</li>
|
||||
<li><a href="https://scholar.google.com/">谷歌学术</a></li>
|
||||
<li><a href="http://xueshu.baidu.com/">百度学术</a></li>
|
||||
<li><a href="https://cn.bing.com/academic">必应学术</a></li>
|
||||
<li><a href="http://www.cnki.net/">中国知网</a></li>
|
||||
<li><a href="http://www.wanfangdata.com.cn/">万方数据</a></li>
|
||||
<li><a href="http://www.cqvip.com/">维普网</a></li>
|
||||
<li><a href="http://www.oalib.com/">OALib</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>词典</li>
|
||||
<li><a href="http://hd.cnki.net/kxhd">汉语词典</a></li>
|
||||
<li><a href="https://dictionary.cambridge.org/zhs/">剑桥词典</a></li>
|
||||
<li><a href="https://www.collinsdictionary.com/zh/">柯林斯词典</a></li>
|
||||
<li><a href="https://www.youdao.com/">有道词典</a></li>
|
||||
<li><a href="http://www.zdic.net/">汉典</a></li>
|
||||
<li><a href="https://cjjc.weblio.jp/">日中辞典</a></li>
|
||||
<li><a href="https://zh.dict.naver.com/">韩中词典</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>资讯</li>
|
||||
<li><a href="http://edu.qq.com/">腾讯教育</a></li>
|
||||
<li><a href="http://learning.sohu.com/">搜狐教育</a></li>
|
||||
<li><a href="http://www.163.com/">新浪教育</a></li>
|
||||
<li><a href="http://www.eol.cn/">中国教育在线</a></li>
|
||||
<li><a href="http://www.xdf.cn/">新东方</a></li>
|
||||
<li><a href="http://www.hjenglish.com/">沪江英语</a></li>
|
||||
<li><a href="https://www.51test.net/">无忧考网</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>模考</li>
|
||||
<li><a href="http://www.51mokao.com/">我要模考</a></li>
|
||||
<li><a href="http://www.kmf.com/">考满分留学</a></li>
|
||||
<li><a href="https://leetcode-cn.com/">LeetCode</a></li>
|
||||
<li><a href="http://www.chinaacc.com/tiku/">中华会计网校</a></li>
|
||||
<li><a href="https://www.typing.com/student">打字练习</a></li>
|
||||
<li><a href="http://www.jxedt.com/">驾校一点通</a></li>
|
||||
<li><a href="http://www.jiakaobaodian.com/">驾考宝典</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>便捷</li>
|
||||
<li><a href="http://www.duolingo.cn/">多邻国</a></li>
|
||||
<li><a href="https://www.shanbay.com/">扇贝</a></li>
|
||||
<li><a href="http://www.baicizhan.com/">百词斩</a></li>
|
||||
<li><a href="http://www.51voa.com/">51VOA</a></li>
|
||||
<li><a href="https://smallpdf.com/cn">在线PDF</a></li>
|
||||
<li><a href="http://webdemo.myscript.com/">公式字符</a></li>
|
||||
<li><a href="https://www.wolframalpha.com/">Wolfram Alpha</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>成绩</li>
|
||||
<li><a href="https://www.chsi.com.cn/cet/">英语四六级</a></li>
|
||||
<li><a href="http://hainan.cltt.org/web/login/pscp01001.aspx">普通话水平</a></li>
|
||||
<li><a href="http://60.208.116.167:81/pas/querycert.jsp">会计从业资格</a></li>
|
||||
<li><a href="http://ntce.neea.edu.cn/html1/folder/1508/211-1.htm?sid=660">教师资格</a></li>
|
||||
<li><a href="http://zscx.neea.edu.cn/html1/folder/1508/211-1.htm?sid=300">计算机等级</a></li>
|
||||
<li><a href="http://ielts.etest.edu.cn/">雅思</a></li>
|
||||
<li><a href="https://toefl.neea.cn/">托福</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<div id="设计" class="tabcontent">
|
||||
<ul>
|
||||
<li>灵感</li>
|
||||
<li><a href="https://www.behance.net/">Behance</a></li>
|
||||
<li><a href="https://dribbble.com/">Dribbble</a></li>
|
||||
<li><a href="https://muz.li/">Muzli</a></li>
|
||||
<li><a href="https://www.mydesy.com/">MyDesy</a></li>
|
||||
<li><a href="http://www.zcool.com.cn/">ZCOOL</a></li>
|
||||
<li><a href="https://thefwa.com/">FWA</a></li>
|
||||
<li><a href="https://land-book.com/">LandBook</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>图库</li>
|
||||
<li><a href="http://huabanpro.com/">Huaban</a></li>
|
||||
<li><a href="https://unsplash.com/">Unsplash</a></li>
|
||||
<li><a href="https://pixabay.com/">Pixabay</a></li>
|
||||
<li><a href="https://500px.com/">500px</a></li>
|
||||
<li><a href="https://www.pinterest.com/">Pinterest</a></li>
|
||||
<li><a href="https://www.pexels.com/">PEXELS</a></li>
|
||||
<li><a href="https://www.splitshire.com/">SplitShire</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>素材</li>
|
||||
<li><a href="http://www.nipic.com/">NiPic</a></li>
|
||||
<li><a href="http://www.58pic.com/">58Pic</a></li>
|
||||
<li><a href="https://www.freepik.com/">freepik</a></li>
|
||||
<li><a href="http://www.uikit.me/">UIKit</a></li>
|
||||
<li><a href="https://www.pixeden.com/">Pixeden</a></li>
|
||||
<li><a href="http://subtlepatterns.com/">Subtlepatterns</a></li>
|
||||
<li><a href="http://www.fribbble.com/">Fribbble</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>字体</li>
|
||||
<li><a href="https://fontsup.com/">Fontsup</a></li>
|
||||
<li><a href="https://www.dafont.com/">dafont</a></li>
|
||||
<li><a href="http://www.qiuziti.com/">Qiuziti</a></li>
|
||||
<li><a href="https://www.myfonts.com/">MyFonts</a></li>
|
||||
<li><a href="https://zh.fonts2u.com/">Fonts2u</a></li>
|
||||
<li><a href="http://www.fontfabric.com/">Fontfabric</a></li>
|
||||
<li><a href="https://www.urbanfonts.com/">UrbanFonts</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>交互</li>
|
||||
<li><a href="http://www.ui.cn/">UICN</a></li>
|
||||
<li><a href="https://sitesee.co/">SiteSee</a></li>
|
||||
<li><a href="https://uigarage.net/">UIGarage</a></li>
|
||||
<li><a href="https://bestwebsite.gallery/">BestWebsite</a></li>
|
||||
<li><a href="http://collectui.com/">CollectUI</a></li>
|
||||
<li><a href="https://uimovement.com/">UIMovement</a></li>
|
||||
<li><a href="https://reeoo.com/">Reeoo</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>颜色</li>
|
||||
<li><a href="https://colorhunt.co/">ColorHunt</a></li>
|
||||
<li><a href="https://coolors.co/">Coolors</a></li>
|
||||
<li><a href="https://color.adobe.com/zh/">AdobeColor</a></li>
|
||||
<li><a href="https://webgradients.com/">WebGradients</a></li>
|
||||
<li><a href="https://trianglify.io/">Trianglify</a></li>
|
||||
<li><a href="http://www.colorfavs.com/">ColorFavs</a></li>
|
||||
<li><a href="http://colllor.com/">Colllor</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>工具</li>
|
||||
<li><a href="https://www.fotor.com.cn/">Fotor</a></li>
|
||||
<li><a href="https://www.photopea.com/">Photopea</a></li>
|
||||
<li><a href="https://www.autodraw.com/">AutoDraw</a></li>
|
||||
<li><a href="https://www.figma.com/">Figma</a></li>
|
||||
<li><a href="http://editor.method.ac/">SVG Draw</a></li>
|
||||
<li><a href="https://cloudconvert.com/">CloudConvert</a></li>
|
||||
<li><a href="https://tinypng.com/">TinyPNG</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>规范</li>
|
||||
<li><a href="https://developer.apple.com/design/">Apple</a></li>
|
||||
<li><a href="https://design.google/">Google</a></li>
|
||||
<li><a href="https://www.microsoft.com/design/">Microsoft</a></li>
|
||||
<li><a href="https://material.io/">Material</a></li>
|
||||
<li><a href="https://developer.android.google.cn/design/">Android</a></li>
|
||||
<li><a href="http://screensiz.es/phone">ScreenSize</a></li>
|
||||
<li><a href="https://weui.io/">WeUI</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<div id="技术" class="tabcontent">
|
||||
<ul>
|
||||
<li>发现</li>
|
||||
<li><a href="https://www.v2ex.com/">V2EX</a></li>
|
||||
<li><a href="https://juejin.im/">掘金</a></li>
|
||||
<li><a href="https://www.oschina.net/">开源中国</a></li>
|
||||
<li><a href="https://www.csdn.net/">CSDN</a></li>
|
||||
<li><a href="http://www.infoq.com/cn/">InfoQ</a></li>
|
||||
<li><a href="http://next.36kr.com/">NEXT</a></li>
|
||||
<li><a href="https://news.ycombinator.com/">HackerNews</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>数码</li>
|
||||
<li><a href="http://www.dgtle.com/">数字尾巴</a></li>
|
||||
<li><a href="https://www.ifanr.com/">爱范儿</a></li>
|
||||
<li><a href="https://www.leiphone.com/">雷锋网</a></li>
|
||||
<li><a href="http://www.geekpark.net/">极客公园</a></li>
|
||||
<li><a href="http://www.chinabyte.com/">比特网</a></li>
|
||||
<li><a href="http://www.zealer.com/">ZEALER</a></li>
|
||||
<li><a href="https://chinese.engadget.com/">Engadget</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>平台</li>
|
||||
<li><a href="https://github.com/">GitHub</a></li>
|
||||
<li><a href="https://coding.net/">Coding</a></li>
|
||||
<li><a href="https://shimo.im/">石墨</a></li>
|
||||
<li><a href="http://naotu.baidu.com/">百度脑图</a></li>
|
||||
<li><a href="https://www.zybuluo.com/mdeditor">CmdMarkdown</a></li>
|
||||
<li><a href="https://tinypng.com/">TinyPNG</a></li>
|
||||
<li><a href="https://sm.ms/">SM.MS 图床</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>工具</li>
|
||||
<li><a href="https://www.ipip.net/ip.html">IP查询</a></li>
|
||||
<li><a href="http://www.speedtest.net/">Speedtest</a></li>
|
||||
<li><a href="https://www.17ce.com/">17CE</a></li>
|
||||
<li><a href="https://tool.lu/">在线工具</a></li>
|
||||
<li><a href="https://www.freeformatter.com/">代码格式化</a></li>
|
||||
<li><a href="https://www.moakt.com/">临时邮箱</a></li>
|
||||
<li><a href="https://www.domcomp.com/">域名比价</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>文档</li>
|
||||
<li><a href="https://docs.microsoft.com/zh-cn/">Microsoft文档</a></li>
|
||||
<li><a href="https://developers.google.com/china/">Google开发者</a></li>
|
||||
<li><a href="https://developer.mozilla.org/zh-CN/">MDN文档</a></li>
|
||||
<li><a href="http://www.w3school.com.cn/">W3school</a></li>
|
||||
<li><a href="http://www.runoob.com/">菜鸟教程</a></li>
|
||||
<li><a href="http://man.linuxde.net/">Linux命令</a></li>
|
||||
<li><a href="https://mp.weixin.qq.com/debug/wxadoc/dev/index.html">微信小程序</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>博客</li>
|
||||
<li><a href="http://www.aliued.cn/">阿里UED</a></li>
|
||||
<li><a href="https://tech.youzan.com/">有赞技术</a></li>
|
||||
<li><a href="http://jdc.jd.com/">京东JDC</a></li>
|
||||
<li><a href="http://www.alloyteam.com/">腾讯全端</a></li>
|
||||
<li><a href="http://ued.baidu.com/">百度UED</a></li>
|
||||
<li><a href="https://fed.renren.com/">人人网FED</a></li>
|
||||
<li><a href="http://www.ruanyifeng.com/">阮一峰博客</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>资源</li>
|
||||
<li><a href="https://sspai.com/">少数派</a></li>
|
||||
<li><a href="https://www.lizhi.io/">数码荔枝</a></li>
|
||||
<li><a href="https://www.iplaysoft.com/">异次元</a></li>
|
||||
<li><a href="https://en.softonic.com/">Softonic</a></li>
|
||||
<li><a href="http://macdownload.informer.com/">MacInformer</a></li>
|
||||
<li><a href="http://down.chinaz.com/">站长下载</a></li>
|
||||
<li><a href="http://mirrors.ustc.edu.cn/">中科大镜像</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>云端</li>
|
||||
<li><a href="https://www.aliyun.com/">阿里云</a></li>
|
||||
<li><a href="https://cloud.tencent.com/">腾讯云</a></li>
|
||||
<li><a href="https://aws.amazon.com/cn/">AWS</a></li>
|
||||
<li><a href="https://cloud.google.com/">GoogleCloud</a></li>
|
||||
<li><a href="https://www.linode.com/">Linode</a></li>
|
||||
<li><a href="https://www.digitalocean.com/">DigitalOcean</a></li>
|
||||
<li><a href="https://bandwagonhost.com/">Bandwagon</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<script>document.getElementById("常用").style.display = "block";</script>
|
||||
</body></html>
|
1
zh/searchurl/txt/night.css
Normal file
1
zh/searchurl/txt/night.css
Normal file
|
@ -0,0 +1 @@
|
|||
html,img,video{filter:invert(1) hue-rotate(180deg) !important;}body{background:white !important;}img[src],input[type=image]{opacity:.9;}
|
6
zh/searchurl/txt/night1.css
Normal file
6
zh/searchurl/txt/night1.css
Normal file
|
@ -0,0 +1,6 @@
|
|||
html, body, header, div, section, main, table, td, thead, tr, th, article, form, li, ul, nav, iframe { background-color: black !important; color: rgba(255, 255, 255, 0.8) !important; border-color: transparent !important;}
|
||||
code, input, textarea { border-color: white !important; background-color: black !important; color: white !important; border: 0px 0px 0px 1px; }
|
||||
span, h1, h2, h3, h4, h5, h6, pre, li, p , b { color: rgba(255, 255, 255, 0.8) !important; border-color: transparent !important; }
|
||||
l a, a:link, a b { color: rgba(53, 221, 162) !important; border-color: transparent !important; }
|
||||
span, h1, h2, h3, h4, h5, h6, pre, li, p, a, a:link { background-color: transparent !important;}
|
||||
*:empty, div:empty, td:empty, span:empty{ background-color: rgba(0,0,0,0) !important;}
|
1
zh/searchurl/txt/night_old.css
Normal file
1
zh/searchurl/txt/night_old.css
Normal file
|
@ -0,0 +1 @@
|
|||
html,img,video{-webkit-filter:invert(1) hue-rotate(180deg) !important;filter:invert(1) hue-rotate(180deg) !important;}body{background:black !important;}img[src],input[type=image]{opacity:.9;}
|
3
zh/searchurl/txt/offline.link
Normal file
3
zh/searchurl/txt/offline.link
Normal file
|
@ -0,0 +1,3 @@
|
|||
pcloud:https://my.pcloud.com/ {let psc=setInterval(function(){var upBtn=document.querySelector('div.uploadfiles');if(upBtn){clearInterval(psc);upBtn.click();document.querySelector('span.remoteupload-ctrl').click();var remotearea=document.querySelector('textarea.remotearea');remotearea.value='%u';remotearea.nextSibling.click();}},500);}
|
||||
furk:https://www.furk.net/users/files/add setTimeout(function(){if(!$('#url').length)return;$('#url').val('%u');$(":submit[value='Add download']").click();}, 500);
|
||||
weiyun:https://www.weiyun.com/disk/index.html {let rsc=setInterval(function(){var offBtn=document.querySelector('.icon-bt-s');if(offBtn){clearInterval(rsc);var wsc=setInterval(function(){offBtn.click();var textarea=document.querySelector('textarea.input-block');if(textarea){clearInterval(wsc);document.querySelector(".modal-dialog-bt ul>li:nth-child(2)").click();setTimeout(function(){textarea.value='%u';var event=document.createEvent('HTMLEvents');event.initEvent("input",false,true);textarea.dispatchEvent(event);document.querySelector('div.modal-dialog-ft>button:nth-child(2)').click();setTimeout(function(){document.querySelector('div.modal-dialog-ft>button:nth-child(2)').click();},1000);},500);}},200);}},1000);}
|
1
zh/searchurl/txt/onlyimg.css
Normal file
1
zh/searchurl/txt/onlyimg.css
Normal file
|
@ -0,0 +1 @@
|
|||
:not(a,button,img),a img{visibility:hidden!important;}a,button{visibility:visible!important;}
|
57
zh/searchurl/txt/passwdsave.js
Normal file
57
zh/searchurl/txt/passwdsave.js
Normal file
|
@ -0,0 +1,57 @@
|
|||
(function () {
|
||||
var ask = true; /*true改为false默认记住不询问*/
|
||||
function go() {
|
||||
var allInput = document.querySelectorAll("input");
|
||||
var allShownInput = [];
|
||||
var name;
|
||||
var pass;
|
||||
for (var i = 0; i < allInput.length; i++) {
|
||||
if (allInput[i].offsetWidth != 0) {
|
||||
if (allInput[i].hasAttribute("type")) {
|
||||
if ((allInput[i].getAttribute("type") == "password") || (allInput[i].getAttribute("type") == "text"))
|
||||
allShownInput.push(allInput[i]);
|
||||
} else
|
||||
allShownInput.push(allInput[i]);
|
||||
}
|
||||
}
|
||||
for (i = 1; i < allShownInput.length; i++) {
|
||||
if (allShownInput[i].type == "password") {
|
||||
pass = allShownInput[i];
|
||||
name = allShownInput[i - 1];
|
||||
}
|
||||
}
|
||||
|
||||
if ((!pass) || (!name)) return;
|
||||
|
||||
if (ask) {
|
||||
if (!localStorage.xxM_ifrm) {
|
||||
if (confirm("记住本站密码吗?")) { /*这里可以更改询问语句*/
|
||||
localStorage.setItem("xxM_ifrm", "true");
|
||||
localStorage.xxM_ifrm = "true";
|
||||
} else {
|
||||
localStorage.setItem("xxM_ifrm", "false");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (localStorage.xxM_ifrm == "false") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!localStorage.xxM_name) {
|
||||
localStorage.setItem("xxM_name", "");
|
||||
localStorage.setItem("xxM_pass", "");
|
||||
}
|
||||
name.value = localStorage.xxM_name;
|
||||
pass.value = localStorage.xxM_pass;
|
||||
name.addEventListener("input", function () {
|
||||
localStorage.xxM_name = name.value;
|
||||
});
|
||||
pass.addEventListener("input", function () {
|
||||
localStorage.xxM_pass = pass.value;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
go();
|
||||
})()
|
376
zh/searchurl/txt/pdfviewer.html
Normal file
376
zh/searchurl/txt/pdfviewer.html
Normal file
|
@ -0,0 +1,376 @@
|
|||
<!DOCTYPE html>
|
||||
<html dir="ltr" mozdisallowselectionprint>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>PDF.js viewer</title>
|
||||
|
||||
<link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/pdfjs-dist-viewer-min/build/minified/web/viewer.css">
|
||||
|
||||
|
||||
<!-- This snippet is used in production (included from viewer.html) -->
|
||||
<link rel="resource" type="application/l10n" href="https://fastly.jsdelivr.net/npm/pdfjs-dist-viewer-min/build/minified/web/locale/locale.properties">
|
||||
<script src="https://fastly.jsdelivr.net/npm/pdfjs-dist/build/pdf.js"></script>
|
||||
<script src="https://fastly.jsdelivr.net/npm/pdfjs-dist/build/pdf.worker.js"></script>
|
||||
|
||||
|
||||
<script src="https://fastly.jsdelivr.net/gh/torappinfo/uwebzh/searchurl/txt/pdfviewer.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body tabindex="1">
|
||||
<div id="outerContainer">
|
||||
|
||||
<div id="sidebarContainer">
|
||||
<div id="toolbarSidebar">
|
||||
<div id="toolbarSidebarLeft">
|
||||
<div class="splitToolbarButton toggled">
|
||||
<button id="viewThumbnail" class="toolbarButton toggled" title="Show Thumbnails" tabindex="2" data-l10n-id="thumbs">
|
||||
<span data-l10n-id="thumbs_label">Thumbnails</span>
|
||||
</button>
|
||||
<button id="viewOutline" class="toolbarButton" title="Show Document Outline (double-click to expand/collapse all items)" tabindex="3" data-l10n-id="document_outline">
|
||||
<span data-l10n-id="document_outline_label">Document Outline</span>
|
||||
</button>
|
||||
<button id="viewAttachments" class="toolbarButton" title="Show Attachments" tabindex="4" data-l10n-id="attachments">
|
||||
<span data-l10n-id="attachments_label">Attachments</span>
|
||||
</button>
|
||||
<button id="viewLayers" class="toolbarButton" title="Show Layers (double-click to reset all layers to the default state)" tabindex="5" data-l10n-id="layers">
|
||||
<span data-l10n-id="layers_label">Layers</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="toolbarSidebarRight">
|
||||
<div id="outlineOptionsContainer" class="hidden">
|
||||
<div class="verticalToolbarSeparator"></div>
|
||||
|
||||
<button id="currentOutlineItem" class="toolbarButton" disabled="disabled" title="Find Current Outline Item" tabindex="6" data-l10n-id="current_outline_item">
|
||||
<span data-l10n-id="current_outline_item_label">Current Outline Item</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="sidebarContent">
|
||||
<div id="thumbnailView">
|
||||
</div>
|
||||
<div id="outlineView" class="hidden">
|
||||
</div>
|
||||
<div id="attachmentsView" class="hidden">
|
||||
</div>
|
||||
<div id="layersView" class="hidden">
|
||||
</div>
|
||||
</div>
|
||||
<div id="sidebarResizer"></div>
|
||||
</div> <!-- sidebarContainer -->
|
||||
|
||||
<div id="mainContainer">
|
||||
<div class="findbar hidden doorHanger" id="findbar">
|
||||
<div id="findbarInputContainer">
|
||||
<input id="findInput" class="toolbarField" title="Find" placeholder="Find in document…" tabindex="91" data-l10n-id="find_input">
|
||||
<div class="splitToolbarButton">
|
||||
<button id="findPrevious" class="toolbarButton findPrevious" title="Find the previous occurrence of the phrase" tabindex="92" data-l10n-id="find_previous">
|
||||
<span data-l10n-id="find_previous_label">Previous</span>
|
||||
</button>
|
||||
<div class="splitToolbarButtonSeparator"></div>
|
||||
<button id="findNext" class="toolbarButton findNext" title="Find the next occurrence of the phrase" tabindex="93" data-l10n-id="find_next">
|
||||
<span data-l10n-id="find_next_label">Next</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="findbarOptionsOneContainer">
|
||||
<input type="checkbox" id="findHighlightAll" class="toolbarField" tabindex="94">
|
||||
<label for="findHighlightAll" class="toolbarLabel" data-l10n-id="find_highlight">Highlight all</label>
|
||||
<input type="checkbox" id="findMatchCase" class="toolbarField" tabindex="95">
|
||||
<label for="findMatchCase" class="toolbarLabel" data-l10n-id="find_match_case_label">Match case</label>
|
||||
</div>
|
||||
<div id="findbarOptionsTwoContainer">
|
||||
<input type="checkbox" id="findEntireWord" class="toolbarField" tabindex="96">
|
||||
<label for="findEntireWord" class="toolbarLabel" data-l10n-id="find_entire_word_label">Whole words</label>
|
||||
<span id="findResultsCount" class="toolbarLabel hidden"></span>
|
||||
</div>
|
||||
|
||||
<div id="findbarMessageContainer">
|
||||
<span id="findMsg" class="toolbarLabel"></span>
|
||||
</div>
|
||||
</div> <!-- findbar -->
|
||||
|
||||
<div id="secondaryToolbar" class="secondaryToolbar hidden doorHangerRight">
|
||||
<div id="secondaryToolbarButtonContainer">
|
||||
<button id="secondaryPresentationMode" class="secondaryToolbarButton presentationMode visibleLargeView" title="Switch to Presentation Mode" tabindex="51" data-l10n-id="presentation_mode">
|
||||
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
|
||||
</button>
|
||||
|
||||
<button id="secondaryOpenFile" class="secondaryToolbarButton openFile visibleLargeView" title="Open File" tabindex="52" data-l10n-id="open_file">
|
||||
<span data-l10n-id="open_file_label">Open</span>
|
||||
</button>
|
||||
|
||||
<button id="secondaryPrint" class="secondaryToolbarButton print visibleMediumView" title="Print" tabindex="53" data-l10n-id="print">
|
||||
<span data-l10n-id="print_label">Print</span>
|
||||
</button>
|
||||
|
||||
<button id="secondaryDownload" class="secondaryToolbarButton download visibleMediumView" title="Download" tabindex="54" data-l10n-id="download">
|
||||
<span data-l10n-id="download_label">Download</span>
|
||||
</button>
|
||||
|
||||
<a href="#" id="secondaryViewBookmark" class="secondaryToolbarButton bookmark visibleSmallView" title="Current view (copy or open in new window)" tabindex="55" data-l10n-id="bookmark">
|
||||
<span data-l10n-id="bookmark_label">Current View</span>
|
||||
</a>
|
||||
|
||||
<div class="horizontalToolbarSeparator visibleLargeView"></div>
|
||||
|
||||
<button id="firstPage" class="secondaryToolbarButton firstPage" title="Go to First Page" tabindex="56" data-l10n-id="first_page">
|
||||
<span data-l10n-id="first_page_label">Go to First Page</span>
|
||||
</button>
|
||||
<button id="lastPage" class="secondaryToolbarButton lastPage" title="Go to Last Page" tabindex="57" data-l10n-id="last_page">
|
||||
<span data-l10n-id="last_page_label">Go to Last Page</span>
|
||||
</button>
|
||||
|
||||
<div class="horizontalToolbarSeparator"></div>
|
||||
|
||||
<button id="pageRotateCw" class="secondaryToolbarButton rotateCw" title="Rotate Clockwise" tabindex="58" data-l10n-id="page_rotate_cw">
|
||||
<span data-l10n-id="page_rotate_cw_label">Rotate Clockwise</span>
|
||||
</button>
|
||||
<button id="pageRotateCcw" class="secondaryToolbarButton rotateCcw" title="Rotate Counterclockwise" tabindex="59" data-l10n-id="page_rotate_ccw">
|
||||
<span data-l10n-id="page_rotate_ccw_label">Rotate Counterclockwise</span>
|
||||
</button>
|
||||
|
||||
<div class="horizontalToolbarSeparator"></div>
|
||||
|
||||
<button id="cursorSelectTool" class="secondaryToolbarButton selectTool toggled" title="Enable Text Selection Tool" tabindex="60" data-l10n-id="cursor_text_select_tool">
|
||||
<span data-l10n-id="cursor_text_select_tool_label">Text Selection Tool</span>
|
||||
</button>
|
||||
<button id="cursorHandTool" class="secondaryToolbarButton handTool" title="Enable Hand Tool" tabindex="61" data-l10n-id="cursor_hand_tool">
|
||||
<span data-l10n-id="cursor_hand_tool_label">Hand Tool</span>
|
||||
</button>
|
||||
|
||||
<div class="horizontalToolbarSeparator"></div>
|
||||
|
||||
<button id="scrollVertical" class="secondaryToolbarButton scrollModeButtons scrollVertical toggled" title="Use Vertical Scrolling" tabindex="62" data-l10n-id="scroll_vertical">
|
||||
<span data-l10n-id="scroll_vertical_label">Vertical Scrolling</span>
|
||||
</button>
|
||||
<button id="scrollHorizontal" class="secondaryToolbarButton scrollModeButtons scrollHorizontal" title="Use Horizontal Scrolling" tabindex="63" data-l10n-id="scroll_horizontal">
|
||||
<span data-l10n-id="scroll_horizontal_label">Horizontal Scrolling</span>
|
||||
</button>
|
||||
<button id="scrollWrapped" class="secondaryToolbarButton scrollModeButtons scrollWrapped" title="Use Wrapped Scrolling" tabindex="64" data-l10n-id="scroll_wrapped">
|
||||
<span data-l10n-id="scroll_wrapped_label">Wrapped Scrolling</span>
|
||||
</button>
|
||||
|
||||
<div class="horizontalToolbarSeparator scrollModeButtons"></div>
|
||||
|
||||
<button id="spreadNone" class="secondaryToolbarButton spreadModeButtons spreadNone toggled" title="Do not join page spreads" tabindex="65" data-l10n-id="spread_none">
|
||||
<span data-l10n-id="spread_none_label">No Spreads</span>
|
||||
</button>
|
||||
<button id="spreadOdd" class="secondaryToolbarButton spreadModeButtons spreadOdd" title="Join page spreads starting with odd-numbered pages" tabindex="66" data-l10n-id="spread_odd">
|
||||
<span data-l10n-id="spread_odd_label">Odd Spreads</span>
|
||||
</button>
|
||||
<button id="spreadEven" class="secondaryToolbarButton spreadModeButtons spreadEven" title="Join page spreads starting with even-numbered pages" tabindex="67" data-l10n-id="spread_even">
|
||||
<span data-l10n-id="spread_even_label">Even Spreads</span>
|
||||
</button>
|
||||
|
||||
<div class="horizontalToolbarSeparator spreadModeButtons"></div>
|
||||
|
||||
<button id="documentProperties" class="secondaryToolbarButton documentProperties" title="Document Properties…" tabindex="68" data-l10n-id="document_properties">
|
||||
<span data-l10n-id="document_properties_label">Document Properties…</span>
|
||||
</button>
|
||||
</div>
|
||||
</div> <!-- secondaryToolbar -->
|
||||
|
||||
<div class="toolbar">
|
||||
<div id="toolbarContainer">
|
||||
<div id="toolbarViewer">
|
||||
<div id="toolbarViewerLeft">
|
||||
<button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="11" data-l10n-id="toggle_sidebar" aria-expanded="false" aria-controls="sidebarContainer">
|
||||
<span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span>
|
||||
</button>
|
||||
<div class="toolbarButtonSpacer"></div>
|
||||
<button id="viewFind" class="toolbarButton" title="Find in Document" tabindex="12" data-l10n-id="findbar" aria-expanded="false" aria-controls="findbar">
|
||||
<span data-l10n-id="findbar_label">Find</span>
|
||||
</button>
|
||||
<div class="splitToolbarButton hiddenSmallView">
|
||||
<button class="toolbarButton pageUp" title="Previous Page" id="previous" tabindex="13" data-l10n-id="previous">
|
||||
<span data-l10n-id="previous_label">Previous</span>
|
||||
</button>
|
||||
<div class="splitToolbarButtonSeparator"></div>
|
||||
<button class="toolbarButton pageDown" title="Next Page" id="next" tabindex="14" data-l10n-id="next">
|
||||
<span data-l10n-id="next_label">Next</span>
|
||||
</button>
|
||||
</div>
|
||||
<input type="number" id="pageNumber" class="toolbarField pageNumber" title="Page" value="1" size="4" min="1" tabindex="15" data-l10n-id="page" autocomplete="off">
|
||||
<span id="numPages" class="toolbarLabel"></span>
|
||||
</div>
|
||||
<div id="toolbarViewerRight">
|
||||
<button id="presentationMode" class="toolbarButton presentationMode hiddenLargeView" title="Switch to Presentation Mode" tabindex="31" data-l10n-id="presentation_mode">
|
||||
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
|
||||
</button>
|
||||
|
||||
<button id="openFile" class="toolbarButton openFile hiddenLargeView" title="Open File" tabindex="32" data-l10n-id="open_file">
|
||||
<span data-l10n-id="open_file_label">Open</span>
|
||||
</button>
|
||||
|
||||
<button id="print" class="toolbarButton print hiddenMediumView" title="Print" tabindex="33" data-l10n-id="print">
|
||||
<span data-l10n-id="print_label">Print</span>
|
||||
</button>
|
||||
|
||||
<button id="download" class="toolbarButton download hiddenMediumView" title="Download" tabindex="34" data-l10n-id="download">
|
||||
<span data-l10n-id="download_label">Download</span>
|
||||
</button>
|
||||
<a href="#" id="viewBookmark" class="toolbarButton bookmark hiddenSmallView" title="Current view (copy or open in new window)" tabindex="35" data-l10n-id="bookmark">
|
||||
<span data-l10n-id="bookmark_label">Current View</span>
|
||||
</a>
|
||||
|
||||
<div class="verticalToolbarSeparator hiddenSmallView"></div>
|
||||
|
||||
<button id="secondaryToolbarToggle" class="toolbarButton" title="Tools" tabindex="36" data-l10n-id="tools" aria-expanded="false" aria-controls="secondaryToolbar">
|
||||
<span data-l10n-id="tools_label">Tools</span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="toolbarViewerMiddle">
|
||||
<div class="splitToolbarButton">
|
||||
<button id="zoomOut" class="toolbarButton zoomOut" title="Zoom Out" tabindex="21" data-l10n-id="zoom_out">
|
||||
<span data-l10n-id="zoom_out_label">Zoom Out</span>
|
||||
</button>
|
||||
<div class="splitToolbarButtonSeparator"></div>
|
||||
<button id="zoomIn" class="toolbarButton zoomIn" title="Zoom In" tabindex="22" data-l10n-id="zoom_in">
|
||||
<span data-l10n-id="zoom_in_label">Zoom In</span>
|
||||
</button>
|
||||
</div>
|
||||
<span id="scaleSelectContainer" class="dropdownToolbarButton">
|
||||
<select id="scaleSelect" title="Zoom" tabindex="23" data-l10n-id="zoom">
|
||||
<option id="pageAutoOption" title="" value="auto" selected="selected" data-l10n-id="page_scale_auto">Automatic Zoom</option>
|
||||
<option id="pageActualOption" title="" value="page-actual" data-l10n-id="page_scale_actual">Actual Size</option>
|
||||
<option id="pageFitOption" title="" value="page-fit" data-l10n-id="page_scale_fit">Page Fit</option>
|
||||
<option id="pageWidthOption" title="" value="page-width" data-l10n-id="page_scale_width">Page Width</option>
|
||||
<option id="customScaleOption" title="" value="custom" disabled="disabled" hidden="true"></option>
|
||||
<option title="" value="0.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 50 }'>50%</option>
|
||||
<option title="" value="0.75" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 75 }'>75%</option>
|
||||
<option title="" value="1" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 100 }'>100%</option>
|
||||
<option title="" value="1.25" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 125 }'>125%</option>
|
||||
<option title="" value="1.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 150 }'>150%</option>
|
||||
<option title="" value="2" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 200 }'>200%</option>
|
||||
<option title="" value="3" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 300 }'>300%</option>
|
||||
<option title="" value="4" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 400 }'>400%</option>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="loadingBar">
|
||||
<div class="progress">
|
||||
<div class="glimmer">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="viewerContainer" tabindex="0">
|
||||
<div id="viewer" class="pdfViewer"></div>
|
||||
</div>
|
||||
|
||||
<div id="errorWrapper" hidden='true'>
|
||||
<div id="errorMessageLeft">
|
||||
<span id="errorMessage"></span>
|
||||
<button id="errorShowMore" data-l10n-id="error_more_info">
|
||||
More Information
|
||||
</button>
|
||||
<button id="errorShowLess" data-l10n-id="error_less_info" hidden='true'>
|
||||
Less Information
|
||||
</button>
|
||||
</div>
|
||||
<div id="errorMessageRight">
|
||||
<button id="errorClose" data-l10n-id="error_close">
|
||||
Close
|
||||
</button>
|
||||
</div>
|
||||
<div class="clearBoth"></div>
|
||||
<textarea id="errorMoreInfo" hidden='true' readonly="readonly"></textarea>
|
||||
</div>
|
||||
</div> <!-- mainContainer -->
|
||||
|
||||
<div id="overlayContainer" class="hidden">
|
||||
<div id="passwordOverlay" class="container hidden">
|
||||
<div class="dialog">
|
||||
<div class="row">
|
||||
<p id="passwordText" data-l10n-id="password_label">Enter the password to open this PDF file:</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<input type="password" id="password" class="toolbarField">
|
||||
</div>
|
||||
<div class="buttonRow">
|
||||
<button id="passwordCancel" class="overlayButton"><span data-l10n-id="password_cancel">Cancel</span></button>
|
||||
<button id="passwordSubmit" class="overlayButton"><span data-l10n-id="password_ok">OK</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="documentPropertiesOverlay" class="container hidden">
|
||||
<div class="dialog">
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_file_name">File name:</span> <p id="fileNameField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_file_size">File size:</span> <p id="fileSizeField">-</p>
|
||||
</div>
|
||||
<div class="separator"></div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_title">Title:</span> <p id="titleField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_author">Author:</span> <p id="authorField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_subject">Subject:</span> <p id="subjectField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_keywords">Keywords:</span> <p id="keywordsField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_creation_date">Creation Date:</span> <p id="creationDateField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_modification_date">Modification Date:</span> <p id="modificationDateField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_creator">Creator:</span> <p id="creatorField">-</p>
|
||||
</div>
|
||||
<div class="separator"></div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_producer">PDF Producer:</span> <p id="producerField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_version">PDF Version:</span> <p id="versionField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_page_count">Page Count:</span> <p id="pageCountField">-</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_page_size">Page Size:</span> <p id="pageSizeField">-</p>
|
||||
</div>
|
||||
<div class="separator"></div>
|
||||
<div class="row">
|
||||
<span data-l10n-id="document_properties_linearized">Fast Web View:</span> <p id="linearizedField">-</p>
|
||||
</div>
|
||||
<div class="buttonRow">
|
||||
<button id="documentPropertiesClose" class="overlayButton"><span data-l10n-id="document_properties_close">Close</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="printServiceOverlay" class="container hidden">
|
||||
<div class="dialog">
|
||||
<div class="row">
|
||||
<span data-l10n-id="print_progress_message">Preparing document for printing…</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<progress value="0" max="100"></progress>
|
||||
<span data-l10n-id="print_progress_percent" data-l10n-args='{ "progress": 0 }' class="relative-progress">0%</span>
|
||||
</div>
|
||||
<div class="buttonRow">
|
||||
<button id="printCancel" class="overlayButton"><span data-l10n-id="print_progress_close">Cancel</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- overlayContainer -->
|
||||
|
||||
</div> <!-- outerContainer -->
|
||||
<div id="printContainer"></div>
|
||||
</body>
|
||||
</html>
|
15373
zh/searchurl/txt/pdfviewer.js
Normal file
15373
zh/searchurl/txt/pdfviewer.js
Normal file
File diff suppressed because it is too large
Load diff
46
zh/searchurl/txt/plyr.cfg
Normal file
46
zh/searchurl/txt/plyr.cfg
Normal file
|
@ -0,0 +1,46 @@
|
|||
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no,minimal-ui">
|
||||
<link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/plyr/dist/plyr.css"/>
|
||||
<video id="player" playsinline controls
|
||||
data-plyr-config='{"controls": ["play-large", "play", "progress", "current-time", "settings", "fullscreen"] }'>
|
||||
<source id="src" />
|
||||
</video>
|
||||
<script src="https://fastly.jsdelivr.net/npm/plyr"></script>
|
||||
<script src="https://fastly.jsdelivr.net/hls.js/latest/hls.js"></script>
|
||||
<script>
|
||||
const source = location.search.substring(3);
|
||||
document.getElementById("src").src = source;
|
||||
const video = document.querySelector("video");
|
||||
let i = source.indexOf(".m3u8");
|
||||
if(i>0 &&
|
||||
(source.length <= (i+5) || '?'===source.charAt(i+5)))
|
||||
{
|
||||
const hls = new Hls();
|
||||
hls.loadSource(source);
|
||||
const defaultOptions = {};
|
||||
hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {
|
||||
const availableQualities = hls.levels.map((l) => l.height);
|
||||
defaultOptions.quality = {
|
||||
default: availableQualities[0],
|
||||
options: availableQualities,
|
||||
forced: true,
|
||||
onChange: (e) => updateQuality(e),
|
||||
}
|
||||
|
||||
// Initialize new Plyr player with quality options
|
||||
const player = new Plyr(video, defaultOptions);
|
||||
});
|
||||
hls.attachMedia(video);
|
||||
window.hls = hls;
|
||||
} else {
|
||||
const player = new Plyr(video);
|
||||
}
|
||||
|
||||
function updateQuality(newQuality) {
|
||||
window.hls.levels.forEach((level, levelIndex) => {
|
||||
if (level.height === newQuality) {
|
||||
console.log("Found quality match with " + newQuality);
|
||||
window.hls.currentLevel = levelIndex;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
14
zh/searchurl/txt/query.autoc
Normal file
14
zh/searchurl/txt/query.autoc
Normal file
|
@ -0,0 +1,14 @@
|
|||
"index of /"
|
||||
allintitle:
|
||||
allintext:
|
||||
allinurl:
|
||||
define
|
||||
filetype:
|
||||
intitle:
|
||||
inurl:
|
||||
map:
|
||||
movie:
|
||||
related:
|
||||
site:
|
||||
stock
|
||||
weather
|
1
zh/searchurl/txt/redirect.cfg
Normal file
1
zh/searchurl/txt/redirect.cfg
Normal file
|
@ -0,0 +1 @@
|
|||
www.google.com:www.google.com/recaptcha:recaptcha.net/recaptcha
|
6
zh/searchurl/txt/rjs.cfg
Normal file
6
zh/searchurl/txt/rjs.cfg
Normal file
|
@ -0,0 +1,6 @@
|
|||
背景图:;{document.deepCss=function(a,b){if(!a||!a.style)return'';let c=b.replace(/\-([a-z])/g,function(a,b){return b.toUpperCase()});if(a.currentStyle)return a.style[c]||a.currentStyle[c]||'';let d=document.defaultView||window;return a.style[c]||d.getComputedStyle(a,'').getPropertyValue(b)||''};Array.prototype.indexOf=Array.prototype.indexOf||function(a,b){b=b||0;for(let c=this.length;b<c;){if(this[b]===a)return b;++b}return-1};let e=function(){let a,b=[],c=document.getElementsByTagName('*');for(c=b.slice.call(c,0,c.length);c.length;)(a=document.deepCss(c.shift(),'background-image'))&&(a=/url\(['"]?([^")]+)/.exec(a)||[]),(a=a[1])&&-1==b.indexOf(a)&&(b[b.length]=a);return b}();if(0<e.length){let d=window.open('').document;d.write('<html><head><title>Background images</title></head></body>');for(let f=0;f<e.length;f++)d.write('<img src='),d.write(e[f]),d.write('>');d.write('</body></html>');d.close()}}
|
||||
google翻译:['https://fastly.jsdelivr.net/gh/damengzhu/js1@main/element.js'];b=d.body;v=d.createElement('div');v.id='google_translate_element';v.style='position:fixed;bottom:10px;right:10px;cursor:pointer;z-index:9999';b.insertBefore(v,b.firstChild);function googleTranslateElementInit(){new google.translate.TranslateElement({layout:google.translate.TranslateElement.InlineLayout.SIMPLE,multilanguagePage:true,pageLanguage:'auto',includedLanguages:'zh-CN,zh-TW,en,ko,ja'},'google_translate_element');}
|
||||
googleTranslate2en:'https://fastly.jsdelivr.net/gh/damengzhu/js1@main/element.js';location.hash=location.hash+"#googtrans(en)";b=d.body;v=d.createElement('div');v.id='google_translate_element';v.style='position:fixed;bottom:10px;right:10px;cursor:pointer;z-index:9999';b.insertBefore(v,b.firstChild);function googleTranslateElementInit(){new google.translate.TranslateElement({layout:google.translate.TranslateElement.InlineLayout.SIMPLE,multilanguagePage:true,pageLanguage:'auto',includedLanguages:'zh-CN,zh-TW,en,ko,ja'},'google_translate_element');}
|
||||
google翻译至简体:['https://fastly.jsdelivr.net/gh/damengzhu/js1@main/element.js'];location.hash=location.hash+"#googtrans(zh-CN)";b=d.body;v=d.createElement('div');v.id='google_translate_element';v.style='position:fixed;bottom:10px;right:10px;cursor:pointer;z-index:9999';b.insertBefore(v,b.firstChild);function googleTranslateElementInit(){new google.translate.TranslateElement({layout:google.translate.TranslateElement.InlineLayout.SIMPLE,multilanguagePage:true,pageLanguage:'auto',includedLanguages:'zh-CN,zh-TW,en,ko,ja'},'google_translate_element');}
|
||||
google翻译至繁体:['https://fastly.jsdelivr.net/gh/damengzhu/js1@main/element.js'];location.hash=location.hash+"#googtrans(zh-TW)";b=d.body;v=d.createElement('div');v.id='google_translate_element';v.style='position:fixed;bottom:10px;right:10px;cursor:pointer;z-index:9999';b.insertBefore(v,b.firstChild);function googleTranslateElementInit(){new google.translate.TranslateElement({layout:google.translate.TranslateElement.InlineLayout.SIMPLE,multilanguagePage:true,pageLanguage:'auto',includedLanguages:'zh-CN,zh-TW,en,ko,ja'},'google_translate_element');}
|
||||
|
5
zh/searchurl/txt/select.cfg
Normal file
5
zh/searchurl/txt/select.cfg
Normal file
|
@ -0,0 +1,5 @@
|
|||
TTS:/uweb:printf i:5e;cat
|
||||
笔记:/uweb:printf i:53;cat
|
||||
sitejs:/uweb:printf i:50../sitejs/:;cat
|
||||
保存文本:/uweb:printf i:50%f:;cat
|
||||
|
96
zh/searchurl/txt/txtview.html
Normal file
96
zh/searchurl/txt/txtview.html
Normal file
|
@ -0,0 +1,96 @@
|
|||
<head>
|
||||
<base>
|
||||
<script src="https://fastly.jsdelivr.net/npm/marked@3.0.7/marked.min.js"></script>
|
||||
<script>
|
||||
function absFile(url) {
|
||||
this.name=url;
|
||||
this.slice = async(offset, length) =>{
|
||||
const headers = new Headers();
|
||||
headers.append('range', 'bytes=' + offset + '-' + ( offset + length -1).toString());
|
||||
|
||||
const opts = {
|
||||
credentials: 'include',
|
||||
headers : headers
|
||||
};
|
||||
|
||||
const resp = await fetch( this.name, opts );
|
||||
return await resp.arrayBuffer();
|
||||
//alert(JSON.stringify(resp.headers));
|
||||
//return await resp.text();
|
||||
}
|
||||
}
|
||||
|
||||
var file;
|
||||
var blocksize = 1024;
|
||||
function loadSlice(){
|
||||
function render(u8array){
|
||||
document.body.innerHTML = marked(new TextDecoder().decode(u8array));
|
||||
scroll(0,0);
|
||||
}
|
||||
function setPageUrl(pageurl){
|
||||
let a = document.createElement('a');
|
||||
a.href = "i:5c"+pageurl;
|
||||
a.click();
|
||||
}
|
||||
|
||||
var page = 1;
|
||||
var extrasize = blocksize; //extrasize should <= blocksize
|
||||
let lhash = location.hash;
|
||||
if(lhash){
|
||||
if("p"!==lhash.charAt(1)){//#offset=&[len]
|
||||
let iAmpersand = lhash.indexOf('&',8);
|
||||
let offset = parseInt(lhash.substring(8,iAmpersand));
|
||||
let len = parseInt(lhash.substring(iAmpersand+1));
|
||||
{//update urlInc() url
|
||||
let href = location.href;
|
||||
let iHash = href.indexOf('#');
|
||||
href=href.substring(0,iHash)+"#page="+Math.floor((offset+len)/blocksize);
|
||||
setPageUrl(href);
|
||||
}
|
||||
file.slice(offset,len).then((buffer)=>{
|
||||
let u8 = new Uint8Array(buffer);
|
||||
render(u8);
|
||||
});
|
||||
return;
|
||||
}
|
||||
//#page=
|
||||
page = parseInt(lhash.substring(6));
|
||||
}else
|
||||
setPageUrl(location.href+"#page=1");
|
||||
file.slice(blocksize*(page-1),blocksize+extrasize).then((buffer)=>{
|
||||
let u8 = new Uint8Array(buffer);
|
||||
let u8len = u8.length;
|
||||
let iStart = 0;
|
||||
let limit = Math.min(u8len,extrasize);
|
||||
if(1!=page){
|
||||
for(let i=1;i<limit;i=i+2){
|
||||
if(10==u8[i] && 10==u8[i-1]) {
|
||||
iStart = i+1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
let iEnd = Math.min(u8len,blocksize);
|
||||
limit = Math.min(u8len,blocksize+extrasize);
|
||||
for(let i=blocksize+1;i<limit;i=i+2){
|
||||
if(10==u8[i] && 10==u8[i-1]) {
|
||||
iEnd = i+1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
render(u8.slice(iStart,iEnd));
|
||||
});
|
||||
|
||||
}
|
||||
//?url=#offset=&[len]&page=
|
||||
{
|
||||
let url = location.search.substring(5);
|
||||
file = new absFile(url);
|
||||
document.getElementsByTagName('base')[0].href=url;
|
||||
}
|
||||
window.addEventListener('hashchange',loadSlice);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<script>loadSlice();</script>
|
||||
</body>
|
17
zh/searchurl/txt/videojs.html
Normal file
17
zh/searchurl/txt/videojs.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/video.js/dist/video-js.min.css"/>
|
||||
<video
|
||||
id="player"
|
||||
class="video-js"
|
||||
preload="auto"
|
||||
controls >
|
||||
<source id="src" />
|
||||
</video>
|
||||
<script src="https://fastly.jsdelivr.net/npm/video.js/dist/video.min.js"></script>
|
||||
<script>
|
||||
const source = location.search.substring(3);
|
||||
document.getElementById("src").src = source;
|
||||
let setup = {
|
||||
playbackRates: [0.5, 1, 1.25, 1.5, 2, 4],
|
||||
};
|
||||
let player = videojs('player',setup);
|
||||
</script>
|
733
zh/searchurl/txt/videoplay.js
Normal file
733
zh/searchurl/txt/videoplay.js
Normal file
|
@ -0,0 +1,733 @@
|
|||
if(window.__videoplayer_enhancer__){
|
||||
window.__videoplayer_enhancer__();
|
||||
throw '';
|
||||
}else{
|
||||
window.__videoplayer_enhancer__ = function(){
|
||||
/* lib begin */
|
||||
function debounce(fn, ms = 0) {
|
||||
let timeoutId;
|
||||
return function(...args) {
|
||||
clearTimeout(timeoutId);
|
||||
timeoutId = setTimeout(() => fn.apply(this, args), ms);
|
||||
};
|
||||
};
|
||||
|
||||
function throttle(fn, wait) {
|
||||
let inThrottle, lastFn, lastTime;
|
||||
return function(...args) {
|
||||
if (!inThrottle) {
|
||||
fn.apply(this, args);
|
||||
lastTime = Date.now();
|
||||
inThrottle = true;
|
||||
} else {
|
||||
clearTimeout(lastFn);
|
||||
lastFn = setTimeout(function() {
|
||||
if (Date.now() - lastTime >= wait) {
|
||||
fn.apply(this, args);
|
||||
lastTime = Date.now();
|
||||
}
|
||||
}, Math.max(wait - (Date.now() - lastTime), 0));
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
function is_same_size_position(ele1, ele2) {
|
||||
try {
|
||||
return ele1.clientWidth == ele2.clientWidth &&
|
||||
ele1.clientHeight == ele2.clientHeight &&
|
||||
ele1.scrollHeight == ele2.scrollHeight;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function find_top_wrap_ele(ele) {
|
||||
let origE = ele;
|
||||
let wrap = ele;
|
||||
do {
|
||||
ele = ele.parentElement;
|
||||
if (is_same_size_position(wrap, ele)) {
|
||||
wrap = ele;
|
||||
}
|
||||
}while (ele.tagName !== 'BODY');
|
||||
|
||||
if(wrap == origE) {
|
||||
wrap = document.createElement('div');
|
||||
origE.parentElement.insertBefore(wrap, origE);
|
||||
wrap.append(origE);
|
||||
}
|
||||
return wrap;
|
||||
}
|
||||
|
||||
function fullscreen2Element(ele) {
|
||||
if (document.fullscreen) {
|
||||
let curFS = document.fullscreenElement;
|
||||
if(curFS.tagName === 'VIDEO') {
|
||||
document.exitFullscreen();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function is_parent(ele, parent) {
|
||||
while (ele.tagName !== 'BODY' &&
|
||||
ele !== parent && ele.parentElement !== parent) {
|
||||
ele = ele.parentElement;
|
||||
}
|
||||
return ele.parentElement === parent;
|
||||
}
|
||||
|
||||
function zero_padding(number, length = 2) {
|
||||
return Array(Math.max(length - number.toString().length, 0) + 1).join(0) + number;
|
||||
}
|
||||
|
||||
function sec2HHMMSS(time, sec_base = 1) {
|
||||
const sec = sec_base, min = 60 * sec, hour = 60 * min;
|
||||
const h = Math.floor(time / hour);
|
||||
const m = Math.floor(time % hour / min);
|
||||
const s = Math.floor(time % min / sec);
|
||||
let result = zero_padding(m) + ':' + zero_padding(s);
|
||||
if (h) {
|
||||
return zero_padding(h) + ':' + result;
|
||||
} else {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
function HHMMSS2sec(time, sec_base = 1) {
|
||||
const sec = sec_base, min = 60 * sec, hour = 60 * min;
|
||||
const split = time.split(':');
|
||||
if (split.length < 3) {
|
||||
split.unshift(0);
|
||||
}
|
||||
const h = split[0];
|
||||
const m = split[1];
|
||||
const s = split[2];
|
||||
return h * hour + m * min + s * sec;
|
||||
}
|
||||
|
||||
function get_1cm_pixel_num() {
|
||||
const div = document.createElement('div');
|
||||
div.style.cssText = ['position: fixed', 'width: 1cm', 'visibility: hidden'].join('; ');
|
||||
document.body.append(div);
|
||||
const pixel = div.clientWidth;
|
||||
div.remove();
|
||||
get_1cm_pixel_num = () => pixel;
|
||||
return pixel;
|
||||
}
|
||||
|
||||
function px2cm(px) {
|
||||
return px / get_1cm_pixel_num();
|
||||
}
|
||||
|
||||
/* lib end */
|
||||
|
||||
/* add custom event begin */
|
||||
|
||||
function copy(obj) {
|
||||
const new_obj = {};
|
||||
for (let i in obj) {
|
||||
new_obj[i] = obj[i];
|
||||
}
|
||||
return new_obj;
|
||||
}
|
||||
|
||||
function TapEvent(touch_event) {
|
||||
return new TouchEvent('tap',
|
||||
Object.assign(copy(touch_event),
|
||||
{ bubbles: true, cancelable: true, composed: true }));
|
||||
}
|
||||
|
||||
function DoubleTapEvent(touch_event) {
|
||||
return new TouchEvent('doubletap',
|
||||
Object.assign(copy(touch_event),
|
||||
{ bubbles: true, cancelable: true, composed: true }));
|
||||
}
|
||||
|
||||
function TouchEvent2MouseEvent(event_type, event) {
|
||||
const touch = event.targetTouches && event.targetTouches[0] || {};
|
||||
return new MouseEvent(event_type,
|
||||
Object.assign({}, copy(event), copy(touch),
|
||||
{ bubbles: true, cancelable: true, composed: true }));
|
||||
}
|
||||
|
||||
function add_tap_event_hook(element) {
|
||||
let start_touch, end_touch, end_event = {};
|
||||
const start = e => {
|
||||
start_touch = end_touch = copy(e.touches[0]);
|
||||
end_event = copy(e);
|
||||
};
|
||||
const move = e => {
|
||||
end_touch = copy(e.touches[0]);
|
||||
end_event = copy(e);
|
||||
};
|
||||
const end = e => {
|
||||
if (Math.abs(start_touch.clientX - end_touch.clientX) <= 10 &&
|
||||
Math.abs(start_touch.clientY - end_touch.clientY) <= 10) {
|
||||
e.target.dispatchEvent(new TapEvent(end_event));
|
||||
e.preventDefault();
|
||||
e.target.dispatchEvent(TouchEvent2MouseEvent('click', end_event));
|
||||
}
|
||||
};
|
||||
|
||||
element.addEventListener('touchstart', start, true);
|
||||
element.addEventListener('touchmove', move, true);
|
||||
element.addEventListener('touchend', end, true);
|
||||
|
||||
return function event_clearer() {
|
||||
element.removeEventListener('touchstart', start, true);
|
||||
element.removeEventListener('touchmove', move, true);
|
||||
element.removeEventListener('touchend', end, true);
|
||||
};
|
||||
}
|
||||
|
||||
function add_doubletap_event_hook(element) {
|
||||
let start_time = 0;
|
||||
const doubletap_judge = e => {
|
||||
if (Date.now() - start_time <= 250) {
|
||||
start_time = 0;
|
||||
e.target.dispatchEvent(new DoubleTapEvent(e));
|
||||
} else {
|
||||
start_time = Date.now();
|
||||
}
|
||||
};
|
||||
|
||||
element.addEventListener('tap', doubletap_judge, true);
|
||||
|
||||
return function event_clearer() {
|
||||
element.removeEventListener('tap', doubletap_judge, true);
|
||||
};
|
||||
}
|
||||
|
||||
/* add custom event end */
|
||||
|
||||
function create_prompt_panel() {
|
||||
const prompt_div = document.createElement('div');
|
||||
const prompt_symbol_div = document.createElement('div');
|
||||
const prompt_time_div = document.createElement('div');
|
||||
const prompt_time_begin_span = document.createElement('span');
|
||||
const prompt_time_end_span = document.createElement('span');
|
||||
|
||||
prompt_div.append(prompt_symbol_div, prompt_time_div);
|
||||
prompt_time_div.append(prompt_time_begin_span, ' / ', prompt_time_end_span);
|
||||
|
||||
prompt_div.style.cssText = `
|
||||
width: 10em;
|
||||
position: absolute;
|
||||
z-index: 99999999;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
padding: 15px 0px;
|
||||
margin: calc(-0.5em - 15px) auto auto -5em;
|
||||
background-color: rgba(51, 51, 51, 0.8);
|
||||
border-radius: 15px;
|
||||
text-align: center;
|
||||
font-size: 0.5cm;
|
||||
color: white;
|
||||
display: none;
|
||||
`;
|
||||
prompt_time_begin_span.style.color = '#2fb3ff';
|
||||
|
||||
return {
|
||||
div: prompt_div,
|
||||
symbol: prompt_symbol_div,
|
||||
left_time: prompt_time_begin_span,
|
||||
right_time: prompt_time_end_span,
|
||||
};
|
||||
}
|
||||
|
||||
function create_control_panel() {
|
||||
const div = document.createElement('div');
|
||||
const content_divs = Array(5).fill().map(() => document.createElement('div'));
|
||||
div.append.apply(div, content_divs);
|
||||
|
||||
div.style.cssText = `
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
z-index: 9999999999;
|
||||
top: 0;
|
||||
left: 30%;
|
||||
background-color: rgba(51, 51, 51, 0.8);
|
||||
color: white;
|
||||
box-sizing: border-box;
|
||||
display: none;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 1cm;
|
||||
pointer-events: auto;
|
||||
`;
|
||||
|
||||
return {
|
||||
display() {
|
||||
div.style.display = 'flex';
|
||||
},
|
||||
hidden() {
|
||||
div.style.display = 'none';
|
||||
},
|
||||
toggle() {
|
||||
if (div.style.display === 'flex') {
|
||||
this.hidden();
|
||||
} else {
|
||||
this.display();
|
||||
}
|
||||
},
|
||||
div,
|
||||
content_divs,
|
||||
};
|
||||
}
|
||||
|
||||
const get_video_touch_hook = (video, e) => {
|
||||
let top_wrap = find_top_wrap_ele(video);
|
||||
if (top_wrap === video) {
|
||||
top_wrap = document.createElement('div');
|
||||
video.parentElement.insertBefore(top_wrap, video);
|
||||
top_wrap.append(video);
|
||||
}
|
||||
|
||||
const event_clearer = [add_tap_event_hook, add_doubletap_event_hook].map(x => x(top_wrap));
|
||||
|
||||
const hook_fn = {
|
||||
start: [],
|
||||
move: [],
|
||||
end: [],
|
||||
};
|
||||
|
||||
let start_x, start_time;
|
||||
const touch_start = e => {
|
||||
start_x = e.touches[0].screenX;
|
||||
start_time = video.currentTime;
|
||||
|
||||
hook_fn.start.forEach(fn => fn(e, start_time));
|
||||
//window.playbackRate = video.playbackRate;
|
||||
//video.playbackRate = 4.0;
|
||||
};
|
||||
if (e) {
|
||||
setTimeout(touch_start, 0, e);
|
||||
}
|
||||
|
||||
const touch_move = e => {
|
||||
const end_x = e.touches[0].screenX;
|
||||
const x_distance_px = end_x - start_x;
|
||||
const time_length = px2cm(x_distance_px) * (this.sec_1cm || 1);
|
||||
|
||||
hook_fn.move.forEach(fn => fn(e, start_time, x_distance_px, time_length));
|
||||
fullscreen2Element(top_wrap);
|
||||
};
|
||||
|
||||
const touch_end = e => {
|
||||
hook_fn.end.forEach(fn => fn(e));
|
||||
/*
|
||||
video.playbackRate = window.playbackRate;
|
||||
const end_x = e.changedTouches[0].pageX;
|
||||
if(!(end_x - start_x === 0 ))
|
||||
fullscreen2Element(top_wrap);
|
||||
*/
|
||||
};
|
||||
|
||||
top_wrap.addEventListener('touchstart', touch_start, { passive: false });
|
||||
top_wrap.addEventListener('touchmove', touch_move, { passive: false });
|
||||
top_wrap.addEventListener('touchend', touch_end, { passive: false });
|
||||
|
||||
const remove_hook = () => {
|
||||
top_wrap.removeEventListener('touchstart', touch_start);
|
||||
top_wrap.removeEventListener('touchmove', touch_move);
|
||||
top_wrap.removeEventListener('touchend', touch_end);
|
||||
};
|
||||
|
||||
return { video, hook_fn, wrap: top_wrap, event_clearer: event_clearer.concat(remove_hook) };
|
||||
};
|
||||
|
||||
const hook_video_move = hook => {
|
||||
const {video, hook_fn} = hook;
|
||||
|
||||
hook_fn.start.push(() => {
|
||||
paused = video.paused;
|
||||
});
|
||||
|
||||
let playing;
|
||||
const pause = () => {
|
||||
if (!video.paused) {
|
||||
video.pause();
|
||||
playing = true;
|
||||
}
|
||||
};
|
||||
const play = debounce(() => {
|
||||
if (playing) {
|
||||
video.play();
|
||||
playing = false;
|
||||
}
|
||||
}, 100);
|
||||
|
||||
hook_fn.move.push((e, start_time, x_distance_px, time_length) => {
|
||||
pause();
|
||||
video.currentTime = Math.max(Math.min(start_time + time_length,
|
||||
video.duration),
|
||||
0);
|
||||
play();
|
||||
});
|
||||
};
|
||||
|
||||
const hook_video_time_change = hook => {
|
||||
const {video, hook_fn, event_clearer} = hook;
|
||||
const top_wrap = find_top_wrap_ele(video);
|
||||
const video_prompt = create_prompt_panel();
|
||||
top_wrap.append(video_prompt.div);
|
||||
|
||||
event_clearer.push(() => video_prompt.div.remove());
|
||||
|
||||
hook_fn.start.push(() => {
|
||||
video_prompt.right_time.innerText = sec2HHMMSS(video.duration);
|
||||
});
|
||||
|
||||
hook_fn.move.push((e, start_time, x_distance_px, time_length) => {
|
||||
video_prompt.div.style.display = 'block';
|
||||
time_length = video.currentTime - start_time;
|
||||
video_prompt.symbol.innerText = time_length < 0 ? '-' : '+';
|
||||
video_prompt.symbol.innerText += sec2HHMMSS(Math.abs(time_length));
|
||||
video_prompt.left_time.innerText = sec2HHMMSS(video.currentTime);
|
||||
});
|
||||
|
||||
hook_fn.end.push(() => {
|
||||
video_prompt.div.style.display = 'none';
|
||||
});
|
||||
};
|
||||
|
||||
const hook_video_control = hook => {
|
||||
const {video, hook_fn, event_clearer} = hook;
|
||||
const top_wrap = find_top_wrap_ele(video);
|
||||
const wrap = document.createElement('div');
|
||||
const paddle_div = document.createElement('div');
|
||||
const speed_div = document.createElement('div');
|
||||
const jump_div = document.createElement('div');
|
||||
const skip_div = document.createElement('div');
|
||||
const fullscreen_div = document.createElement('div');
|
||||
const control = create_control_panel();
|
||||
|
||||
top_wrap.append(wrap);
|
||||
const buttons = [paddle_div, speed_div, jump_div, skip_div, fullscreen_div];
|
||||
wrap.append.apply(wrap, buttons);
|
||||
wrap.append(control.div);
|
||||
|
||||
wrap.style.cssText = `
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
pointer-events: none;
|
||||
z-index: 9999999999;
|
||||
display: none;
|
||||
`;
|
||||
|
||||
const update_wrap_size = () => {
|
||||
wrap.style.fontSize = `${Math.min(video.clientHeight, video.clientWidth) / buttons.length / 4}px`;
|
||||
};
|
||||
|
||||
update_wrap_size();
|
||||
|
||||
buttons.forEach(div => div.style.cssText =
|
||||
`
|
||||
width: 3em;
|
||||
height: 3em;
|
||||
line-height: 3em;
|
||||
text-align: center;
|
||||
border: solid white;
|
||||
border-radius: 100%;
|
||||
color: white;
|
||||
pointer-events: auto;
|
||||
`);
|
||||
|
||||
paddle_div.style.pointerEvents = 'none';
|
||||
paddle_div.style.visibility = 'hidden';
|
||||
|
||||
const skip_video = throttle(e => {
|
||||
video.currentTime = video.duration;
|
||||
}, 500);
|
||||
const toggle_play_state = throttle(e => {
|
||||
if (video.paused) {
|
||||
video.play();
|
||||
} else {
|
||||
video.pause();
|
||||
}
|
||||
}, 500);
|
||||
const toggle_fullscreen = throttle(e => {
|
||||
if (document.fullscreen) {
|
||||
document.exitFullscreen();
|
||||
} else {
|
||||
top_wrap.requestFullscreen();
|
||||
}
|
||||
}, 500);
|
||||
|
||||
const update_button = () => {
|
||||
speed_div.innerText = video.playbackRate + 'x';
|
||||
jump_div.innerText = sec2HHMMSS(video.currentTime);
|
||||
};
|
||||
const hidden_wrap = () => {
|
||||
control.hidden();
|
||||
wrap.style.display = 'none';
|
||||
wrap.style.pointerEvents = 'none';
|
||||
};
|
||||
|
||||
const hidden_wrap_delay = debounce(hidden_wrap, 3000);
|
||||
|
||||
const display_wrap = throttle((e) => {
|
||||
update_wrap_size();
|
||||
wrap.style.display = 'block';
|
||||
update_button();
|
||||
hidden_wrap_delay();
|
||||
}, 1000);
|
||||
|
||||
const prevent_event = e => {
|
||||
if (e.cancelable) {
|
||||
e.preventDefault();
|
||||
}
|
||||
e.stopImmediatePropagation();
|
||||
};
|
||||
|
||||
skip_div.innerText = 'skip';
|
||||
fullscreen_div.innerText = 'FS';
|
||||
|
||||
skip_div.addEventListener('tap', skip_video);
|
||||
fullscreen_div.addEventListener('tap', toggle_fullscreen);
|
||||
|
||||
wrap.addEventListener('touchend', prevent_event);
|
||||
|
||||
wrap.addEventListener('touchmove', e => {
|
||||
prevent_event(e);
|
||||
update_button();
|
||||
hidden_wrap_delay();
|
||||
});
|
||||
|
||||
top_wrap.addEventListener('tap', display_wrap);
|
||||
top_wrap.addEventListener('doubletap', toggle_play_state);
|
||||
|
||||
event_clearer.push(() => {
|
||||
top_wrap.removeEventListener('tap', display_wrap);
|
||||
top_wrap.removeEventListener('doubletap', toggle_play_state);
|
||||
wrap.remove();
|
||||
});
|
||||
|
||||
function speed_activate() {
|
||||
video.playbackRate = parseFloat(control.div.innerText.replace(/[\r\n]+/g, ''));
|
||||
update_button();
|
||||
hidden_wrap();
|
||||
}
|
||||
|
||||
function jump_activate() {
|
||||
video.currentTime = HHMMSS2sec(control.div.innerText.replace(/[\r\n]+/g, ''));
|
||||
update_button();
|
||||
hidden_wrap();
|
||||
}
|
||||
|
||||
function clear_content() {
|
||||
control.content_divs.forEach(div => div.innerHTML = '');
|
||||
}
|
||||
|
||||
const set_content_tap_fn = (() => {
|
||||
let bind_fn = [];
|
||||
return fn => {
|
||||
bind_fn.forEach(([div, fn]) => div.removeEventListener('tap', fn));
|
||||
bind_fn = [];
|
||||
control.content_divs.forEach(div => {
|
||||
bind_fn.push([div, fn]);
|
||||
div.addEventListener('tap', fn);
|
||||
});
|
||||
};
|
||||
})();
|
||||
|
||||
let state = [];
|
||||
function set_state() {
|
||||
control.content_divs.forEach((div, i) => state[i] = div.innerText);
|
||||
}
|
||||
|
||||
let start_y, modifier;
|
||||
const start = e => {
|
||||
start_y = e.touches[0].screenY;
|
||||
set_state();
|
||||
};
|
||||
const move = e => {
|
||||
const end_y = e.touches[0].screenY;
|
||||
const y_distance_px = start_y - end_y;
|
||||
const increase = Math.floor(px2cm(y_distance_px) * (this.increase_1cm || 1));
|
||||
const idx = Array.from(e.target.parentElement.children).indexOf(e.target);
|
||||
if (modifier[idx]) {
|
||||
modifier[idx](increase);
|
||||
}
|
||||
};
|
||||
|
||||
const increase_helper = (state_idx, increase,
|
||||
limit, pre_ele_modifier, wrap = x => x) => {
|
||||
const v = parseFloat(state[state_idx]) + increase;
|
||||
if (limit !== undefined) {
|
||||
if (pre_ele_modifier) {
|
||||
if (v >= limit) {
|
||||
pre_ele_modifier(Math.floor(v / limit));
|
||||
control.content_divs[state_idx].innerText = wrap(v % limit);
|
||||
} else if (v < 0) {
|
||||
pre_ele_modifier(-1);
|
||||
control.content_divs[state_idx].innerText = wrap(limit + v);
|
||||
} else {
|
||||
control.content_divs[state_idx].innerText = wrap(v);
|
||||
}
|
||||
} else {
|
||||
control.content_divs[state_idx].innerText =
|
||||
wrap(Math.min(Math.max(v, 0), limit));
|
||||
}
|
||||
} else {
|
||||
control.content_divs[state_idx].innerText = wrap(v);
|
||||
}
|
||||
};
|
||||
|
||||
const speed_modifier = [];
|
||||
speed_modifier[0] = (increase) => {
|
||||
increase_helper(0, increase);
|
||||
};
|
||||
speed_modifier[2] = (increase) => {
|
||||
increase_helper(2, increase, 10, speed_modifier[0]);
|
||||
};
|
||||
speed_modifier[3] = (increase) => {
|
||||
increase_helper(3, increase, 10, speed_modifier[2]);
|
||||
};
|
||||
|
||||
|
||||
const jump_modifier = [];
|
||||
jump_modifier[0] = (increase) => {
|
||||
increase_helper(0, increase, undefined, undefined, zero_padding);
|
||||
};
|
||||
jump_modifier[2] = (increase) => {
|
||||
increase_helper(2, increase, 60, jump_modifier[0], zero_padding);
|
||||
};
|
||||
jump_modifier[4] = (increase) => {
|
||||
increase_helper(4, increase, 60, jump_modifier[2], zero_padding);
|
||||
};
|
||||
|
||||
speed_div.addEventListener('tap', throttle(e => {
|
||||
e.stopImmediatePropagation();
|
||||
clear_content();
|
||||
|
||||
if(window.playbackRate>=4.0) window.playbackRate=0.5;
|
||||
else if(window.playbackRate<1.0) window.playbackRate=1.0;
|
||||
else if(window.playbackRate<1.5) window.playbackRate=1.5;
|
||||
else if(window.playbackRate>=2.0) window.playbackRate=4;
|
||||
else window.playbackRate = 2.0;
|
||||
|
||||
const split = window.playbackRate.toString().split('.');
|
||||
control.content_divs[0].innerText = split[0];
|
||||
control.content_divs[1].innerText = '.';
|
||||
control.content_divs[2].innerText = (split[1] || '00').split('')[0] || 0;
|
||||
control.content_divs[3].innerText = (split[1] || '00').split('')[1] || 0;
|
||||
control.content_divs[4].innerText = 'x';
|
||||
modifier = speed_modifier;
|
||||
set_content_tap_fn(speed_activate);
|
||||
control.display();
|
||||
wrap.style.pointerEvents = 'auto';
|
||||
}, 500));
|
||||
|
||||
jump_div.addEventListener('tap', throttle(e => {
|
||||
e.stopImmediatePropagation();
|
||||
clear_content();
|
||||
|
||||
if(control.div.style.display === 'none'||!window.playbackPos)
|
||||
window.playbackPos = video.currentTime;
|
||||
window.playbackPos += 180;
|
||||
|
||||
const time = sec2HHMMSS(window.playbackPos);
|
||||
const split = time.split(':');
|
||||
if (split.length < 3) {
|
||||
split.unshift('00');
|
||||
}
|
||||
control.content_divs[0].innerText = split[0];
|
||||
control.content_divs[1].innerText = ':';
|
||||
control.content_divs[2].innerText = split[1];
|
||||
control.content_divs[3].innerText = ':';
|
||||
control.content_divs[4].innerText = split[2];
|
||||
modifier = jump_modifier;
|
||||
set_content_tap_fn(jump_activate);
|
||||
control.display();
|
||||
wrap.style.pointerEvents = 'auto';
|
||||
}, 500));
|
||||
|
||||
control.content_divs.forEach(div => {
|
||||
div.addEventListener('touchstart', start, { passive: false });
|
||||
div.addEventListener('touchmove', move, { passive: false });
|
||||
});
|
||||
};
|
||||
|
||||
function find_hook(video) {
|
||||
window.__hook_video__ = window.__hook_video__ || [];
|
||||
const exist_video = window.__hook_video__.find(v => v.video === video);
|
||||
return exist_video;
|
||||
}
|
||||
|
||||
function register_hook(hook) {
|
||||
if (!find_hook(hook.video)) {
|
||||
window.__hook_video__.push(hook);
|
||||
return hook;
|
||||
}
|
||||
}
|
||||
|
||||
const hook_video = (video) => {
|
||||
const exist_video = find_hook(video);
|
||||
if (video.clientWidth && video.clientHeight &&
|
||||
(!exist_video || is_parent(exist_video.wrap, find_top_wrap_ele(video)))) {
|
||||
const hook = get_video_touch_hook(video);
|
||||
hook_video_move(hook);
|
||||
hook_video_time_change(hook);
|
||||
hook_video_control(hook);
|
||||
|
||||
if (exist_video) {
|
||||
exist_video.event_clearer.forEach(x => x());
|
||||
Object.assign(exist_video, hook);
|
||||
console.log('video-improve: reloaded for ', video, ', wrapped by ', find_top_wrap_ele(video));
|
||||
} else {
|
||||
register_hook(hook);
|
||||
console.log('video-improve: loaded for ', video, ', wrapped by ', find_top_wrap_ele(video));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let videos;
|
||||
if (document.fullscreen) {
|
||||
videos = document.fullscreenElement.querySelectorAll('video');
|
||||
}else {
|
||||
function get_frames(window) {
|
||||
const frames = [window];
|
||||
for (let i = 0; i < window.frames.length; i++) {
|
||||
try {
|
||||
window.frames[i].document;
|
||||
} catch {
|
||||
continue;
|
||||
}
|
||||
|
||||
frames.push(...get_frames(window.frames[i]))
|
||||
}
|
||||
return frames;
|
||||
}
|
||||
|
||||
function flatten(array) {
|
||||
if (!Array.isArray(array)) {
|
||||
return [array];
|
||||
} else if (array.length == 0) {
|
||||
return [];
|
||||
} else {
|
||||
return flatten(array[0]).concat(flatten(array.slice(1)));
|
||||
}
|
||||
}
|
||||
|
||||
function get_videos() {
|
||||
const frames = get_frames(window);
|
||||
const frame_video = frame => Array.from(frame.document.querySelectorAll('video'));
|
||||
const shadow = frame => Array.from(frame.document.querySelectorAll("shadow-output"));
|
||||
const shadow_video = shadow => Array.from(shadow.shadowRoot.querySelectorAll("video"));
|
||||
return flatten(frames.map(frame_video)
|
||||
.concat(frames.map(f => shadow(f).map(shadow_video))));
|
||||
}
|
||||
videos = get_videos();
|
||||
}
|
||||
|
||||
videos.forEach(hook_video);
|
||||
};
|
||||
}
|
||||
window.__videoplayer_enhancer__();
|
Loading…
Add table
Add a link
Reference in a new issue