rebuilding site Tue Jul 26 05:05:34 PM CST 2022

This commit is contained in:
James Feng Cao 2022-07-26 17:05:35 +08:00
parent 479dfc3a26
commit ac3c78e978
7 changed files with 72 additions and 113 deletions

View File

@ -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).
Clipboard broadcast needs socatapt install socat)。
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">&quot;.cmds&quot; file format</h4>
<p>Each line has the following format:
[Name]:[mimetype]:[command line]</p>
<p>Each line has the following format:<br>[Name]:[mimetype]:[command line]</p>
<p>[command line] can have &quot;%c&quot; (cookie), &quot;%s&quot; (address bar text), &quot;%u&quot; (url), &quot;%t&quot; (title).
[mimetype] have the following formats:
- regular mimetype such as &quot;text/html&quot; to indicate the content type of the command output.
- &quot;clip/clip&quot; to indicate &quot;clipboard&quot; as input and the command output is copied to clipboard.
- &quot;/clip&quot;: copy the command output to clipboard.
- &quot;clip/text/html&quot; : clipboard as input, and the command output is processed as &quot;text/html&quot;.
- &quot;termux/*&quot;: command line is executed under termux.
- &quot;/uweb&quot;: the command output is processed as <a href="../links/index.html">links</a>.</p>
[mimetype] have the following formats:</p>
<ul>
<li>regular mimetype such as &quot;text/html&quot; to indicate the content type of the command output.</li>
<li>&quot;clip/clip&quot; to indicate &quot;clipboard&quot; as input and the command output is copied to clipboard.</li>
<li>&quot;/clip&quot;: copy the command output to clipboard.</li>
<li>&quot;clip/text/html&quot; : clipboard as input, and the command output is processed as &quot;text/html&quot;.</li>
<li>&quot;termux/*&quot;: command line is executed under termux.</li>
<li>&quot;/uweb&quot;: the command output is processed as <a href="../links/index.html">links</a>.</li>
</ul>
</body></html>

View File

@ -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:00searx:https://searchx.mobi/?q=">searx:https://searchx.mobi/?q=</a></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>
</p><p>
Scholar:<br>

View 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";

View File

@ -77,7 +77,7 @@
如果用到了第二个正则表达式,此时将域名前缀表达式合并到第二个正则表达式中,从而仅使用一个表达式可优化性能。</p>
</li>
</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>

View 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/

View File

@ -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: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: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: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: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: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: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疯狂音乐: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>

View File

@ -74,108 +74,16 @@
</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);
//?file=./xxx/xx.xx,./xx/xx.xxx#word=
let filenames = location.search.substring(6);
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();
}
},
});
});
});
let dictinput = document.getElementById('dictfile');
let wordinput = document.getElementById('word');
wordinput.value = word;
{
dictinput.setAttribute('accept',filenames);
location.href="i:5fsetTimeout(()=>{dictinput.click()},20);setTimeout(()=>{document.getElementById('btnLookup').click();dictinput.removeAttribute('accept');},70)";
}
</script>
</body>
</html>