From 0e965b52e65710a0cb9ba05ad77a4635f87ec804 Mon Sep 17 00:00:00 2001 From: rjsteinert Date: Fri, 22 Feb 2019 14:57:41 -0500 Subject: [PATCH 1/2] #36 Tweak copyProfileUrl to give user a shareable link where the user's profile can be viewed --- lib/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/app.js b/lib/app.js index 316157d..16c9f51 100644 --- a/lib/app.js +++ b/lib/app.js @@ -673,7 +673,7 @@ module.exports = class FritterApp { } copyProfileUrl () { - var profileUrl = document.getElementById('profile-url') + var profileUrl = `${window.location.origin}/user/${document.getElementById('profile-url')}` profileUrl.select() document.execCommand('copy') } From 624f0a3f3252ccea40b79e07b650e84fc88dc544 Mon Sep 17 00:00:00 2001 From: rjsteinert Date: Fri, 22 Feb 2019 15:01:08 -0500 Subject: [PATCH 2/2] Remove extra dat:// from copied profile URL --- lib/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/app.js b/lib/app.js index 16c9f51..441a6f2 100644 --- a/lib/app.js +++ b/lib/app.js @@ -673,7 +673,7 @@ module.exports = class FritterApp { } copyProfileUrl () { - var profileUrl = `${window.location.origin}/user/${document.getElementById('profile-url')}` + var profileUrl = `${window.location.origin}/user/${document.getElementById('profile-url').replace('dat://','')}` profileUrl.select() document.execCommand('copy') }