mirror of
https://github.com/dkmstr/openuds-gui.git
synced 2024-10-26 08:55:23 +03:00
Minor improvement for openWindow for external urls
This commit is contained in:
parent
37b0b44ab3
commit
5cc81c30df
@ -234,7 +234,7 @@ export class Plugin {
|
||||
let wnd = '__global__';
|
||||
// check if on same window or not
|
||||
if (location.indexOf('o_s_w=') !== -1) {
|
||||
const osw = /(.*)&o_s_w=.*/.exec(location);
|
||||
const osw = /(.*)[&?]o_s_w=.*/.exec(location);
|
||||
wnd = '__same__';
|
||||
// @ts-ignore osw is something for sure, checked before
|
||||
location = osw[1];
|
||||
@ -242,7 +242,7 @@ export class Plugin {
|
||||
// If the url contains "o_n_w", will open the url on a new window ALWAYS
|
||||
if (location.indexOf('o_n_w=') !== -1) {
|
||||
// Extract window name from o_n_w parameter if present
|
||||
const onw = /(.*)&o_n_w=([a-zA-Z0-9._-]*)/.exec(location);
|
||||
const onw = /(.*)[&?]o_n_w=([a-zA-Z0-9._-]*)/.exec(location);
|
||||
if (onw) {
|
||||
wnd = onw[2];
|
||||
location = onw[1];
|
||||
|
@ -157,9 +157,9 @@ export class UDSApiService implements UDSApiServiceType {
|
||||
executeCustomJSForServiceLaunch(): void {
|
||||
// Executes a defined JS on launch servic event if defined
|
||||
// this is in fact a hook
|
||||
if (udsData.customJSForServiceLaunch !== undefined) {
|
||||
if (udsData.custom_js_for_service_launch !== undefined) {
|
||||
// eslint-disable-next-line no-eval
|
||||
eval(udsData.customJSForServiceLaunch);
|
||||
eval(udsData.custom_js_for_service_launch);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user