-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
072adc2
commit d634821
Showing
2 changed files
with
44 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<script lang="ts"> | ||
import { page } from '$app/stores'; | ||
import { trackClick } from '../google-analytics'; | ||
const copyToClipboard = function (text: string) { | ||
const input = document.createElement('input'); | ||
input.setAttribute('value', text); | ||
document.body.appendChild(input); | ||
input.select(); | ||
document.execCommand('copy'); | ||
document.body.removeChild(input); | ||
}; | ||
const copyUrl = function () { | ||
copyToClipboard($page.url.href); | ||
trackClick('copy_link'); | ||
}; | ||
</script> | ||
|
||
<h3>2. Share the link to this room with who you want to watch a movie with</h3> | ||
|
||
<div class="uk-text-center uk-margin-top"> | ||
<div | ||
class="pointer uk-button uk-button-link uk-text-lowercase uk-text-center" | ||
uk-tooltip="Click to copy" | ||
on:click={copyUrl} | ||
> | ||
{$page.url} | ||
</div> | ||
<div class="uk-text-muted uk-text-small">Click the link to copy it to the clipboard</div> | ||
</div> |