mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 01:41:12 +02:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user