mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
- added config-option to restrict available locales - fixed opensearch suggestions by generating strict json - include TalentCalc.css as lowerCase (fixes display under *nix) - some minor formating - Setup: * added some additional files to be generated (they required STATIC_URL or HOST_URL to be set) * moved class Locale from global.js to own template and generate it with CFG_LOCALES * changed urlParam (?build=script): may be empty (builds everything) or specific scriptNames chained together with ; (?build=script1;script2) you are required to run the following command to regenerate files affected by these cahnges ?build=demo;power;realmMenu;searchboxBody;searchboxScript;searchplugin;locales
36 lines
963 B
JavaScript
36 lines
963 B
JavaScript
(function () {
|
|
function create(w, h) {
|
|
var body = 'STATIC_URL/widgets/searchbox/searchbox.html';;
|
|
var buff = '<iframe src="' + body + '" width="' + w + '" height="' + h + '" frameborder="0" class="aowow-searchbox"';
|
|
buff += "></iframe>";
|
|
|
|
document.write(buff);
|
|
}
|
|
|
|
function init() {
|
|
var formats = {
|
|
"160x200": { width: 160, height: 200 },
|
|
"160x120": { width: 160, height: 120 },
|
|
"120x200": { width: 120, height: 200 },
|
|
"120x120": { width: 120, height: 120 },
|
|
"150x120": { width: 150, height: 120 }
|
|
};
|
|
|
|
var dim;
|
|
|
|
if (typeof aowow_searchbox_format != "undefined") {
|
|
if (formats[aowow_searchbox_format]) {
|
|
dim = formats[aowow_searchbox_format];
|
|
}
|
|
}
|
|
|
|
if (!dim) {
|
|
dim = formats["160x200"];
|
|
}
|
|
|
|
create(dim.width, dim.height);
|
|
}
|
|
|
|
init();
|
|
})();
|