yWeb: move goUrl() and goPort() away from Y_NIlib.js

Origin commit data
------------------
Branch: ni/coolstream
Commit: bc15870197
Author: vanhofen <vanhofen@gmx.de>
Date: 2023-02-21 (Tue, 21 Feb 2023)

Origin message was:
------------------
- yWeb: move goUrl() and goPort() away from Y_NIlib.js

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2023-02-21 22:52:10 +01:00
parent b4d785c51a
commit 1f7890de40
14 changed files with 38 additions and 40 deletions

View File

@@ -1,27 +1,6 @@
/* 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);