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

@ -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>