From 3810d24315ec2bda10030e5662114f9174e8bb38 Mon Sep 17 00:00:00 2001 From: Eason010212 <1371033826@qq.com> Date: Mon, 30 Sep 2024 10:03:26 +0800 Subject: [PATCH] fix-share-link-protocol --- js/projects.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/projects.js b/js/projects.js index 086b8da..c8e270a 100644 --- a/js/projects.js +++ b/js/projects.js @@ -490,8 +490,8 @@ function check_share_key() { $("#shareKey").addClass('btn-success') $("#shareKey").html("ON") sharekey.html(globalShareKey) - sharelink.html("http://"+window.location.host + "/observe?sid=" + globalShareKey) - sharelink.attr("href", "http://"+window.location.host + "/observe?sid=" + globalShareKey) + sharelink.html(window.location.href.split("/")[0]+"//"+window.location.host + "/observe?sid=" + globalShareKey) + sharelink.attr("href", window.location.href.split("/")[0]+"//"+window.location.host + "/observe?sid=" + globalShareKey) sharelink.css("color","#1cc88a") } }