From 897ebe82b3342a225a8a2cd912bf1b7e28d0c106 Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Mon, 21 Aug 2023 12:29:36 +0700 Subject: [PATCH] Modify parent url --- view-mode/function/overlaySCurve.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/view-mode/function/overlaySCurve.js b/view-mode/function/overlaySCurve.js index bac7636..9b41082 100644 --- a/view-mode/function/overlaySCurve.js +++ b/view-mode/function/overlaySCurve.js @@ -17,12 +17,9 @@ function messageListener(event) { if (event.data && event.data.action === 'sendUrl') { const parentUrl = event.data.url; - // Remove the base URL and hash - const path = parentUrl.replace("https://adw.ospro.id/#/dashboard-project/", ""); - // Split the remaining path by "/" - parts = path.split("/"); - if (parts[2] && parts[2] == "1") { + parts = parentUrl.split("/"); + if (parts[7] && parts[7] == "1") { $.ajax({ headers: { "Content-Type": "application/json",