2022-09-10 12:55:34 +00:00
<!doctype html>
< html >
< head >
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
2022-10-31 07:44:05 +00:00
< link rel = "stylesheet" href = "../style.css" type = "text/css" / >
2022-09-10 12:55:34 +00:00
< title > Search engine files< / title >
< script type = "text/javascript" >
function findLang(){
let href = location.href;
for(let i=href.length-1;i>0;i--){
if('/'==href.charAt(i) & & '/'==href.charAt(i-3))
return i;
}
return 0;
}
function nav2(page){
let i = findLang();
location.href = location.href.substring(0,i+1)+page;
}
function nav2Lang(lang){
let i = findLang();
let href = location.href;
location.href = location.href.substring(0,i-2)+lang+location.href.substring(i);
}
< / script >
< / head >
< body >
< header class = 'header' >
< a class = "logo" href = "javascript:void(0)" onclick = "return nav2('index.html')" > Home< / a > < a class = "logo" href = "javascript:void(0)" onclick = "return nav2('tags/index.html')" > Tags< / a >
< a class = "logo" href = "javascript:void(0)" onclick = "return nav2Lang('zh')" > 简体中文< / a >
< nav >
< / nav >
< / header >
< br / >
< div class = "container" >
< h1 class = "title" > Search engine files
< br >
< span class = "subtitle" > < / span >
< / h1 >
< ul class = "tags" >
< li > < a href = "../tags/search%20engine" > search engine< / a > < / li >
< / ul >
< p > Any " .search" file can be opened as search engine file, each line of which has one of the following formats:< br >
[Engine name]:[url without '%s' inside]< br >
[Engine name]:[url with '%s' as keyword]< br >
2023-03-03 22:57:28 +00:00
[Engine name]:POST:[post params with '%s' as keyword]:[url]< br >
[Engine name]:[Extra request headers]:[post params with '%s' as keyword]:[url]< / p >
< ul >
< li > [Extra request headers] Ex. " X-Forwarded-For;8.8.8.8" < / li >
2023-03-04 01:43:13 +00:00
< li > when [post params] is empty, the url should have '%s' as keyword. Ex. < a href = "../search/index.html" > bingUS engine w/ chatgpt< / a > < / li >
2023-03-03 22:57:28 +00:00
< / ul >
2022-09-10 12:55:34 +00:00
< p > Limitations (they are here for performance reasons):< / p >
< ul >
< li > The first engine in the file must be the first type that has no '%s' in the engine url.< / li >
< li > Internal scheme engine urls (such as i:, d:, c:) must have '%s', since '%s' format is more general (only type 2 is allowed, since POST makes no sense for internal schemes).< / li >
< / ul >
< h4 id = "local-engines" > Local engines< / h4 >
< p > c:[command line with '%s' as keyword]< br >
d:mimetype:[command line with '%s' as keyword]:[base url for external resources]< / p >
< / div >
2023-03-05 03:12:05 +00:00
< p > Last Modified: 4 March 2023< br >
2023-03-05 03:17:42 +00:00
i:0m to support extra headers< / p >
2022-09-10 12:55:34 +00:00
< / body >
< / html >