You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
here is the code , the url is a visual host
I wonder why , when I shut down the wifi , the alfred will return the result more quickly?
If turn on the wifi,will be more slow, I have logged the url in alfy.fetch function,which shows
they both use the cached data .
alfy.fetch('http://linuxcmd.com/data.json',
{maxAge: 86400000}).then(result => {
var commands = [];
var e = 0;
for(var a in result){
++e;
result[a]['id'] = e;
commands.push(result[a]);
}
var i=0,
page_size = commands.length,
arrResult = [],
query=alfy.input;
if(commands&&commands.length&&toString.call(commands).indexOf('Array')>-1){
var count = 0
for (; i < page_size; i++) {
if(isSreachIndexOF(commands[i].n,query)
|| isSreachIndexOF(commands[i].d,query)
){
if(count < page_size){
arrResult.push(commands[i]);
++count;
}
}
}
}
var items = [];
for(var i = 0;i< arrResult.length;i++){
items.push({
title: arrResult[i].n,
subtitle: arrResult[i].d,
arg: arrResult[i].n
})
}
if(items.length < 1){
items.push({
title: "没有搜素到内容",
subtitle: "请尝试其它关键字",
})
}
alfy.output(items);
});
The text was updated successfully, but these errors were encountered:
here is the code , the url is a visual host
I wonder why , when I shut down the wifi , the alfred will return the result more quickly?
If turn on the wifi,will be more slow, I have logged the url in alfy.fetch function,which shows
they both use the cached data .
The text was updated successfully, but these errors were encountered: