From 29f883c20af98aacd8cee3290afd2cd1cd22fe2a Mon Sep 17 00:00:00 2001 From: cracker Date: Mon, 4 Mar 2019 19:50:38 +0100 Subject: [PATCH] add share whiteboard btn --- public/index.html | 53 +++++++++++++++++++++++++++++++++-------------- public/js/main.js | 16 ++++++++++++++ 2 files changed, 53 insertions(+), 16 deletions(-) diff --git a/public/index.html b/public/index.html index 456433c..ca04a48 100644 --- a/public/index.html +++ b/public/index.html @@ -31,7 +31,8 @@ - - - -
- + + + -
+ \ No newline at end of file diff --git a/public/js/main.js b/public/js/main.js index 562eadc..95acde8 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -148,6 +148,22 @@ $(document).ready(function () { $("#uploadJsonBtn").click(function () { $("#myFile").click(); }); + + $("#shareWhiteboardBtn").click(function () { + var url = window.location.href; + var s = url.indexOf("&username=")!==-1 ? "&username=" : "username="; //Remove username from url + var urlSlpit = url.split(s); + var urlStart = urlSlpit[0]; + if(urlSlpit.length>1) { + var endSplit = urlSlpit[1].split("&"); + endSplit = endSplit.splice(1, 1); + urlStart += "&"+endSplit.join("&"); + } + $("