Skip to content

Commit

Permalink
fix(share): remove duplicate url when copying
Browse files Browse the repository at this point in the history
  • Loading branch information
hiimzimmy committed Jan 27, 2022
1 parent 1983bad commit 3b7b335
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,17 +245,11 @@ $(document).ready(function() {
$(".shareButton").click(function(e) {
var viewParams = getKrpanoViewParameters();
var url = viewParams ?
`${window.location.href}?${jQuery.param(viewParams)}` :
window.location.href;
`${window.location.href.split("?")[0]}?${jQuery.param(viewParams)}` :
window.location.href.split("?")[0];
if (navigator.share) {
navigator.share({
title: `
Experience the ${document.title}
with me.
`,
text: `
I thought you might find this interesting: ${url}
`,
title: `Experience the ${document.title} with me.`,
url: url,
});
} else {
Expand Down

0 comments on commit 3b7b335

Please sign in to comment.