mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
rebuilding site Fri Sep 25 08:25:08 AM CST 2020
This commit is contained in:
parent
6339fdcddd
commit
416dc23af0
6 changed files with 45 additions and 43 deletions
|
@ -70,7 +70,7 @@ pdf:uweb:echo file:///sdcard/uweb/app/pdf.js/web/viewer.html?file=%u djvu:uweb:e
|
|||
"colors.txt":护眼背景色
|
||||
"default.css":勾选网址特定样式后无匹配情形下的默认样式
|
||||
"night.css":夜间模式,代替超微内部实现
|
||||
"videoplayer.js":用户定义视频播放
|
||||
"bookmarklet/videoplayer.js":用户定义视频播放
|
||||
"types.sniff":嗅探类型
|
||||
"sniff.log":嗅探结果
|
||||
"history.rec":访问历史
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
"colors.txt":护眼背景色<br>
|
||||
"default.css":<a href="../sitejs">勾选网址特定样式后无匹配情形下的默认样式</a><br>
|
||||
"night.css":<a href="../globalcss">夜间模式</a>,代替超微内部实现<br>
|
||||
"<a href="../video">videoplayer.js</a>":用户定义视频播放<br>
|
||||
"<a href="../video">bookmarklet/videoplayer.js</a>":用户定义视频播放<br>
|
||||
"types.sniff":嗅探类型<br>
|
||||
"sniff.log":嗅探结果<br>
|
||||
"history.rec":访问历史<br>
|
||||
|
|
|
@ -70,7 +70,7 @@ pdf:uweb:echo file:///sdcard/uweb/app/pdf.js/web/viewer.html?file=%u djvu:uweb:e
|
|||
&quot;colors.txt&quot;:护眼背景色
|
||||
&quot;default.css&quot;:勾选网址特定样式后无匹配情形下的默认样式
|
||||
&quot;night.css&quot;:夜间模式,代替超微内部实现
|
||||
&quot;videoplayer.js&quot;:用户定义视频播放
|
||||
&quot;bookmarklet/videoplayer.js&quot;:用户定义视频播放
|
||||
&quot;types.sniff&quot;:嗅探类型
|
||||
&quot;sniff.log&quot;:嗅探结果
|
||||
&quot;history.rec&quot;:访问历史
|
||||
|
|
|
@ -39,8 +39,8 @@ noproxy::010:</p>
|
|||
<p>"i:"内部链接:<br>
|
||||
i:16[mimetype]:[Action Name]:[App Name]:[Activity Name]<br>
|
||||
读取第三方应用输入。<br>
|
||||
点击安装<a href="i:51i:16uweb:mark.qrcode.SCAN:mark.qrcode:mark.qrcode.CaptureActivity"> via扫码</a>菜单至常用链接。其它扫描器也都可以使用,只需要把链接里的名字换掉就行。 上面的方案其实不仅可以扫描qr,也可以使用任何第三方应用获得任何种类的数据。其中有uweb表示特殊mimetype,作为url来使用。其他数据类型改成合适的mimetype即可。</p>
|
||||
<p>点击安装<a href="i:51i:16uweb:android.intent.action.VIEW:com.coolapk.market:com.coolapk.market.view.photo.QRCodeActivity">酷安扫描</a>至常用链接</p>
|
||||
点击安装<a href="i:53i:16uweb:mark.qrcode.SCAN:mark.qrcode:mark.qrcode.CaptureActivity"> via扫码</a>菜单至常用链接。其它扫描器也都可以使用,只需要把链接里的名字换掉就行。 上面的方案其实不仅可以扫描qr,也可以使用任何第三方应用获得任何种类的数据。其中有uweb表示特殊mimetype,作为url来使用。其他数据类型改成合适的mimetype即可。</p>
|
||||
<p>点击安装<a href="i:53i:16uweb:android.intent.action.VIEW:com.coolapk.market:com.coolapk.market.view.photo.QRCodeActivity">酷安扫描</a>至常用链接</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
(function(){
|
||||
/* lib begin */
|
||||
|
||||
function debounce(fn, ms = 0) {
|
||||
let timeoutId;
|
||||
return function(...args) {
|
||||
|
@ -73,16 +72,6 @@ function is_parent(ele, parent) {
|
|||
return ele.parentElement === parent;
|
||||
}
|
||||
|
||||
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 zero_padding(number, length = 2) {
|
||||
return Array(Math.max(length - number.toString().length, 0) + 1).join(0) + number;
|
||||
}
|
||||
|
@ -656,29 +645,6 @@ const hook_video_control = hook => {
|
|||
});
|
||||
};
|
||||
|
||||
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 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))));
|
||||
}
|
||||
|
||||
function find_hook(video) {
|
||||
window.__hook_video__ = window.__hook_video__ || [];
|
||||
const exist_video = window.__hook_video__.find(v => v.video === video);
|
||||
|
@ -712,5 +678,44 @@ const hook_video = (video) => {
|
|||
}
|
||||
};
|
||||
|
||||
get_videos().forEach(hook_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);
|
||||
})()
|
||||
|
|
|
@ -48,11 +48,8 @@
|
|||
<a href="i:01epub:file:///sdcard/uweb/app/reader/index.html?bookPath==">epub:file:///sdcard/uweb/app/reader/index.html?bookPath==</a><br>
|
||||
</p><p>
|
||||
视频解析 (UA为PC时无广告):<br>
|
||||
<a href="i:0160jx:https://60jx.com/?url=">60jx:https://60jx.com/?url=</a><br>
|
||||
<a href="i:012020jx:https://api.2020jx.com/?url=">2020jx:https://api.2020jx.com/?url=</a><br>
|
||||
<a href="i:01qyly:http://jx.qyly360.com/?url=">qyly:http://jx.qyly360.com/?url=</a><br>
|
||||
<a href="i:01iztyy:http://jx.iztyy.com/svip/?url=">iztyy:http://jx.iztyy.com/svip/?url=</a><br>
|
||||
<a href="i:01fo97:https://play.fo97.cn/?url=">fo97:https://play.fo97.cn/?url=</a><br>
|
||||
</p>
|
||||
<p>其中"重定向"由<a href="/uweb/redirect">文件default.redirect配置</a>,对"file://"重定向将调用合适编辑器编辑文件。</p>
|
||||
<p>更多视频服务见:<br />
|
||||
|
|
Loading…
Reference in a new issue