Encyclopedia

Implement Encyclopedia on Wiki

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://greasyfork.org/scripts/382269-encyclopedia/code/Encyclopedia.js?version=692987

Author
yaju1919
Ratings
0 0 0
Version
0.0.1.20190427103353
Created
Updated
License
N/A
Applies to
All sites

Author's Description

prepare


Encyclopedia.regist({
URL:"https://ja.wikipedia.org/wiki",
randomURL:"https://ja.wikipedia.org/wiki/特別:おまかせ表示",
callback:(response)=>{
wiki(response);
}
});
Encyclopedia.regist({
URL:"https://ansaikuropedia.org/wiki",
randomURL:"https://ansaikuropedia.org/wiki/特別:おまかせ表示",
callback:(response)=>{
wiki(response);
}
});
Encyclopedia.regist({
URL:"https://sonshi.xyz/wiki",
randomURL:"https://sonshi.xyz/wiki/特別:おまかせ表示",
callback:(response)=>{
wiki(response);
}
});

use


Encyclopedia.search(keyword); // Search for keywords

Encyclopedia.search(); // Search randomly

configuration

to avoid google restriction
have to wait to send request

Encyclopedia.set(2000); // will wait 2000 milisecond
// default wait time is 1000 milisecond