mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
rebuilding site Tue Jul 26 05:05:34 PM CST 2022
This commit is contained in:
parent
479dfc3a26
commit
ac3c78e978
7 changed files with 72 additions and 113 deletions
|
@ -10,17 +10,24 @@ Click the following links to install commands with <a href="../index.html">uweb
|
||||||
Clipboard2PC needs to modify username, PC needs xsel. ssh needs to be installed inside termux (apt install openssh).
|
Clipboard2PC needs to modify username, PC needs xsel. ssh needs to be installed inside termux (apt install openssh).
|
||||||
Clipboard broadcast needs socat(apt install socat)。
|
Clipboard broadcast needs socat(apt install socat)。
|
||||||
Clipboard2QR needs libqrencode.</p>
|
Clipboard2QR needs libqrencode.</p>
|
||||||
|
<h4 id="more-commands-click-to-install">More commands (click to install)</h4>
|
||||||
|
<p><a href="i:0gdefault.cmds::mdme:text/html:echo %22<script src=https://fastly.jsdelivr.net/npm/mdme></script><textarea>%22;cat %25f%0A">mdme: Show local markdown file</a> </p>
|
||||||
|
<p><a href="i:0gdefault.cmds::texme:text/html:echo %22<script src=https://fastly.jsdelivr.net/npm/texme></script><textarea>%22;cat %25f%0A">texme: Show local tex+markdown file</a></p>
|
||||||
|
<p><a href="i:0gdefault.cmds::markdeep:text/html:cat %25f;echo %22<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>%22%0A">markdeep: Show local markdown+tex+diagrams file</a></p>
|
||||||
|
<p><a href="i:0gdefault.cmds::remark slide:text/html:echo %22<script src=https://remarkjs.com/downloads/remark-latest.min.js></script><script>window.onload=function(){var slideshow=remark.create({navigation:{click:true,},});}</script><textarea id=%27source%27>class:middle%22;cat %25f%0A">remark slide: slide show for local markdown file</a></p>
|
||||||
|
<p><a href="i:0gdefault.cmds:https://cdn.jsdelivr.net/gh/torappinfo/uwebzh/en/searchurl/txt/cmds.cfg">Code editor, open url in clipboard etc.</a></p>
|
||||||
<h4 id="cmds-file-format">".cmds" file format</h4>
|
<h4 id="cmds-file-format">".cmds" file format</h4>
|
||||||
<p>Each line has the following format:
|
<p>Each line has the following format:<br>[Name]:[mimetype]:[command line]</p>
|
||||||
[Name]:[mimetype]:[command line]</p>
|
|
||||||
<p>[command line] can have "%c" (cookie), "%s" (address bar text), "%u" (url), "%t" (title).
|
<p>[command line] can have "%c" (cookie), "%s" (address bar text), "%u" (url), "%t" (title).
|
||||||
[mimetype] have the following formats:
|
[mimetype] have the following formats:</p>
|
||||||
- regular mimetype such as "text/html" to indicate the content type of the command output.
|
<ul>
|
||||||
- "clip/clip" to indicate "clipboard" as input and the command output is copied to clipboard.
|
<li>regular mimetype such as "text/html" to indicate the content type of the command output.</li>
|
||||||
- "/clip": copy the command output to clipboard.
|
<li>"clip/clip" to indicate "clipboard" as input and the command output is copied to clipboard.</li>
|
||||||
- "clip/text/html" : clipboard as input, and the command output is processed as "text/html".
|
<li>"/clip": copy the command output to clipboard.</li>
|
||||||
- "termux/*": command line is executed under termux.
|
<li>"clip/text/html" : clipboard as input, and the command output is processed as "text/html".</li>
|
||||||
- "/uweb": the command output is processed as <a href="../links/index.html">links</a>.</p>
|
<li>"termux/*": command line is executed under termux.</li>
|
||||||
|
<li>"/uweb": the command output is processed as <a href="../links/index.html">links</a>.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
</body></html>
|
</body></html>
|
||||||
|
|
|
@ -95,6 +95,16 @@ Engines that can use as documentation:<br>
|
||||||
<p><a href="i:00yandex:https://yandex.com/search/?text=">yandex:https://yandex.com/search/?text=</a></p>
|
<p><a href="i:00yandex:https://yandex.com/search/?text=">yandex:https://yandex.com/search/?text=</a></p>
|
||||||
<p><a href="i:00searx:https://searchx.mobi/?q=">searx:https://searchx.mobi/?q=</a></p>
|
<p><a href="i:00searx:https://searchx.mobi/?q=">searx:https://searchx.mobi/?q=</a></p>
|
||||||
</p><p>
|
</p><p>
|
||||||
|
Medical:<br>
|
||||||
|
<p><a href="i:00merckmanuals:https://www.merckmanuals.com/professional/SearchResults?query=">merckmanuals:https://www.merckmanuals.com/professional/SearchResults?query=</a></p>
|
||||||
|
<p><a href="i:00openmd:https://openmd.com/search?q=">openmd:https://openmd.com/search?q=</a></p>
|
||||||
|
<p><a href="i:00medical-dict:https://medical-dictionary.com/results.php?term=">medical-dict:https://medical-dictionary.com/results.php?term=</a></p>
|
||||||
|
<p><a href="i:00ncbiBooks:https://www.ncbi.nlm.nih.gov/books/?term=">ncbiBooks:https://www.ncbi.nlm.nih.gov/books/?term=</a></p>
|
||||||
|
<p><a href="i:00healio:https://journals.healio.com/action/doSearch?AllField=">healio:https://journals.healio.com/action/doSearch?AllField=</a></p>
|
||||||
|
<p><a href="i:00pubmed:https://pubmed.ncbi.nlm.nih.gov/?term=">pubmed:https://pubmed.ncbi.nlm.nih.gov/?term=</a></p>
|
||||||
|
<p><a href="i:00pmc:https://www.ncbi.nlm.nih.gov/pmc/?term=">pmc:https://www.ncbi.nlm.nih.gov/pmc/?term=</a></p>
|
||||||
|
<p><a href="i:00Tabers:https://www.tabers.com/tabersonline/search?st=OSS&q=">Tabers:https://www.tabers.com/tabersonline/search?st=OSS&q=</a></p>
|
||||||
|
</p><p>
|
||||||
Cloud storage:<br>
|
Cloud storage:<br>
|
||||||
</p><p>
|
</p><p>
|
||||||
Scholar:<br>
|
Scholar:<br>
|
||||||
|
|
2
en/searchurl/txt/cmds.cfg
Normal file
2
en/searchurl/txt/cmds.cfg
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
open clipboard link:clip/uweb:/system/bin/toybox grep -m1 -Eo '(http|https)://[^ "'\'']+'
|
||||||
|
code editor: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";
|
|
@ -77,7 +77,7 @@
|
||||||
如果用到了第二个正则表达式,此时将域名前缀表达式合并到第二个正则表达式中,从而仅使用一个表达式可优化性能。</p>
|
如果用到了第二个正则表达式,此时将域名前缀表达式合并到第二个正则表达式中,从而仅使用一个表达式可优化性能。</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p><a target="_self" href="i:0bhttp://fastly.jsdelivr.net/gh/torappinfo/uwebzh/zh/searchurl/default.hosts.tar.gz">点击本链接自动用样例覆盖default.hosts</a></p>
|
<p><a target="_self" href="i:0hdefault.hosts:http://fastly.jsdelivr.net/gh/torappinfo/uwebzh/zh/searchurl/default.hosts">点击本链接自动用样例覆盖default.hosts</a></p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
31
zh/searchurl/default.hosts
Normal file
31
zh/searchurl/default.hosts
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
ssp.360.cn
|
||||||
|
appjiagu.com
|
||||||
|
adm-cnzz.net
|
||||||
|
alimama.com
|
||||||
|
ipinyou.com
|
||||||
|
mct01.com
|
||||||
|
tanx.com
|
||||||
|
wrating.com
|
||||||
|
pos.baidu.com
|
||||||
|
union.baidu.com
|
||||||
|
share.baidu.com
|
||||||
|
baidu.com ^.?pro
|
||||||
|
e.qq.com
|
||||||
|
gdt.qq.com
|
||||||
|
l.qq.com
|
||||||
|
beacon.sina.com.cn
|
||||||
|
mix.sina.com.cn
|
||||||
|
sina.com.cn ^(d|ad|sax).$
|
||||||
|
aty.sohu.com
|
||||||
|
go.sohu.com
|
||||||
|
sohu.com
|
||||||
|
inte.sogou.com
|
||||||
|
epro.sogou.com
|
||||||
|
union.sogou.com
|
||||||
|
golden1.sogou.com
|
||||||
|
uranus.sogou.com
|
||||||
|
inte.sogoucdn.com
|
||||||
|
lu.sogoucdn.com
|
||||||
|
theta.sogoucdn.com
|
||||||
|
ad.xiaomi.com
|
||||||
|
ifengimg.com ^/feather/
|
|
@ -72,16 +72,17 @@
|
||||||
<p><a href="i:00magi:https://magi.com/search?q=">magi:https://magi.com/search?q=</a></p>
|
<p><a href="i:00magi:https://magi.com/search?q=">magi:https://magi.com/search?q=</a></p>
|
||||||
<p><a href="i:00Lookao:https://lookao.com/search?q=">Lookao:https://lookao.com/search?q=</a></p>
|
<p><a href="i:00Lookao:https://lookao.com/search?q=">Lookao:https://lookao.com/search?q=</a></p>
|
||||||
<p><a href="i:00answers:https://www.answers.com/search?q=">answers:https://www.answers.com/search?q=</a></p>
|
<p><a href="i:00answers:https://www.answers.com/search?q=">answers:https://www.answers.com/search?q=</a></p>
|
||||||
<p><a href="i:00影视:https://www.cupfox.com/search?key=">影视:https://www.cupfox.com/search?key=</a></p>
|
<p><a href="i:00影视:https://cupfox.app/search?key=">影视:https://cupfox.app/search?key=</a></p>
|
||||||
<p><a href="i:00努努影院:https://www.nunuyy.top/so/%s---.html">努努影院:https://www.nunuyy.top/so/%s---.html</a></p>
|
<p><a href="i:00努努影院:https://www.nunuyy.top/so/%s---.html">努努影院:https://www.nunuyy.top/so/%s---.html</a></p>
|
||||||
<p><a href="i:004444影视:http://k.4444.li/search.php?searchword=">4444影视:http://k.4444.li/search.php?searchword=</a></p>
|
<p><a href="i:004444影视:http://k.4444.li/search.php?searchword=">4444影视:http://k.4444.li/search.php?searchword=</a></p>
|
||||||
<p><a href="i:00nfmovies:https://www.nfmovies.com/search.php?searchword=">nfmovies:https://www.nfmovies.com/search.php?searchword=</a></p>
|
<p><a href="i:00nfmovies:https://www.nfmovies.com/search.php?searchword=">nfmovies:https://www.nfmovies.com/search.php?searchword=</a></p>
|
||||||
<p><a href="i:00电影狗:https://www.dianyinggou.com/so/">电影狗:https://www.dianyinggou.com/so/</a></p>
|
<p><a href="i:00电影狗:https://www.dianyinggou.com/so/">电影狗:https://www.dianyinggou.com/so/</a></p>
|
||||||
<p><a href="i:00pianku:https://www.pianku.la/search/%s-------------.html">pianku:https://www.pianku.la/search/%s-------------.html</a></p>
|
<p><a href="i:00pianku:https://www.pianku.la/search/%s-------------.html">pianku:https://www.pianku.la/search/%s-------------.html</a></p>
|
||||||
<p><a href="i:00novip:https://www.novipnoad.com/s=">novip:https://www.novipnoad.com/s=</a></p>
|
<p><a href="i:00novip:https://www.novipnoad.com/s=">novip:https://www.novipnoad.com/s=</a></p>
|
||||||
|
<p><a href="i:00555dianying:https://555dianying.cc/vodsearch/-------------.html?wd=">555dianying:https://555dianying.cc/vodsearch/-------------.html?wd=</a></p>
|
||||||
<p><a href="i:00zhenbuka:https://www.zhenbuka5.com/vodsearch/-------------/?wd=">zhenbuka:https://www.zhenbuka5.com/vodsearch/-------------/?wd=</a></p>
|
<p><a href="i:00zhenbuka:https://www.zhenbuka5.com/vodsearch/-------------/?wd=">zhenbuka:https://www.zhenbuka5.com/vodsearch/-------------/?wd=</a></p>
|
||||||
<p><a href="i:007080:https://7080.wang/so.html?wd=">7080:https://7080.wang/so.html?wd=</a></p>
|
<p><a href="i:007080:https://7080.wang/so.html?wd=">7080:https://7080.wang/so.html?wd=</a></p>
|
||||||
<p><a href="i:001090:https://1090hd.com/search.html?wd=">1090:https://1090hd.com/search.html?wd=</a></p>
|
<p><a href="i:001090:https://1090hd.com/vod/search.html?wd=">1090:https://1090hd.com/vod/search.html?wd=</a></p>
|
||||||
<p><a href="i:00微博:https://s.weibo.com/weibo/">微博:https://s.weibo.com/weibo/</a></p>
|
<p><a href="i:00微博:https://s.weibo.com/weibo/">微博:https://s.weibo.com/weibo/</a></p>
|
||||||
<p><a href="i:00疯狂音乐:http://music.myepoch.cn/?type=netease&name=">疯狂音乐:http://music.myepoch.cn/?type=netease&name=</a></p>
|
<p><a href="i:00疯狂音乐:http://music.myepoch.cn/?type=netease&name=">疯狂音乐:http://music.myepoch.cn/?type=netease&name=</a></p>
|
||||||
<p><a href="i:00墨灵音乐:https://music.mli.im/music.web?auto-action=true&action=search&wd=">墨灵音乐:https://music.mli.im/music.web?auto-action=true&action=search&wd=</a></p>
|
<p><a href="i:00墨灵音乐:https://music.mli.im/music.web?auto-action=true&action=search&wd=">墨灵音乐:https://music.mli.im/music.web?auto-action=true&action=search&wd=</a></p>
|
||||||
|
|
|
@ -74,108 +74,16 @@
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
<script>
|
<script>
|
||||||
function AbstractFile(url) {
|
//?file=./xxx/xx.xx,./xx/xx.xxx#word=
|
||||||
this.name=url;
|
let filenames = location.search.substring(6);
|
||||||
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);
|
let word = location.hash.substring(6);
|
||||||
var fileList = [new AbstractFile(url)];
|
let dictinput = document.getElementById('dictfile');
|
||||||
|
let wordinput = document.getElementById('word');
|
||||||
var mdict;
|
wordinput.value = word;
|
||||||
define('mdict-parseXml', function() {
|
{
|
||||||
return function (str) {
|
dictinput.setAttribute('accept',filenames);
|
||||||
return (new DOMParser()).parseFromString(str, 'text/xml');
|
location.href="i:5fsetTimeout(()=>{dictinput.click()},20);setTimeout(()=>{document.getElementById('btnLookup').click();dictinput.removeAttribute('accept');},70)";
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
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>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue