jQuery(document).ready(function($) { jQuery('.elementor-lost-password').attr('href', '/forget-password/'); check_login1(); fix_7s_url(); }); function closeElementorModal() { // 選擇關閉按鈕並檢查是否存在 const closeButton = document.querySelector('.dialog-close-button.dialog-lightbox-close-button'); if (closeButton) { // 觸發點擊事件以關閉 Modal 視窗 closeButton.click(); } } // 找出頁面上有 href="/en/7s/" 的超連結,並且改為 href="/7s/" function fix_7s_url() { // 找出頁面上有 href="/en/7s/" 的超連結 const links = document.querySelectorAll('a[href="/en/7s/"]'); // 逐一處理每一個超連結 links.forEach(link => { // 將 href 屬性改為 "/7s/" link.setAttribute('href', '/7s/'); }); } // 檢查是否已登入 function check_login1() { jQuery.ajax({         url: "/bvg/api.php",         type: "POST",         dataType: 'json',         data: {             'act'   : 'check_login'         },         success: function (Jdata) {                          if(Jdata.status== 'success') {             if(Jdata.bvg_role == 'admin' || Jdata.bvg_role == 'manager') { } else { jQuery(".user-7s").remove(); }         } },      error: function() {             }      }); }