mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
Origin commit data
------------------
Commit: cd9294bf14
Author: vanhofen <vanhofen@gmx.de>
Date: 2023-02-20 (Mon, 20 Feb 2023)
Origin message was:
------------------
- yWeb: move some js-functions directly to Y_NI_About.yhtm
38 lines
828 B
JavaScript
38 lines
828 B
JavaScript
/* yWeb NIlib by NI-Team
|
|
*/
|
|
|
|
// next function is taken from the original yweb
|
|
// to make them available in all of our pages
|
|
function goUrl(_url){
|
|
var res = trim(loadSyncURL(_url));
|
|
switch(res){
|
|
case "1": res="on"; break;
|
|
case "0": res="off"; break;
|
|
}
|
|
$("out").update(res);
|
|
}
|
|
|
|
function goPort(_port) {
|
|
if (_port == "") return;
|
|
var host = self.location.href;
|
|
var pos1 = host.indexOf('//');
|
|
var temp = host.substring(pos1+2,host.length);
|
|
var pos2 = temp.indexOf('/');
|
|
var host = host.substring(0,pos1+2+pos2);
|
|
window.open(host + ":" + _port,"_blank");
|
|
}
|
|
|
|
function Y_NI_Tools(_cmd, _tout){
|
|
$("out").update("");
|
|
show_waitbox(true);
|
|
goUrl("/control/exec?Y_NI_Tools&" + _cmd);
|
|
if (typeof(_tout) == "undefined")
|
|
{
|
|
show_waitbox(false);
|
|
}
|
|
else
|
|
{
|
|
window.setTimeout("document.location.reload()", _tout);
|
|
}
|
|
}
|