Skip to content

Commit

Permalink
♻️ Refactor function names
Browse files Browse the repository at this point in the history
  • Loading branch information
robinvanopstal committed Jul 28, 2020
1 parent 91a330e commit 8f944f0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions playground/src/share-view/share-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ class ShareView extends FlyIn {
this.target = target;
this.editor = editor;
this.content.insertAdjacentHTML('beforeend', template());
Button.from(trigger, this.showSharing.bind(this));
Button.from(trigger, this.showShare.bind(this));

this.textarea = this.content.querySelector('#share-url');
this.textarea.setAttribute('readonly', '');
Button.from(this.content.querySelector('#copy-button'), this.onClick.bind(this));
}

showSharing() {
this.shareUrl = this.createSharingUrl();
showShare() {
this.shareUrl = this.createShareUrl();
this.textarea.innerHTML = this.shareUrl;
this.toggle();
}
Expand All @@ -52,7 +52,7 @@ class ShareView extends FlyIn {
* Create a hash from the current editor source and generate sharable URL
* @return {String} URL string
*/
createSharingUrl() {
createShareUrl() {
const source = this.editor.getSource();
const shareUrl = new URL(window.location.href);
shareUrl.searchParams.delete('url');
Expand Down

0 comments on commit 8f944f0

Please sign in to comment.