Skip to content

Commit

Permalink
Internal change.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 555510973
  • Loading branch information
iftenney authored and LIT team committed Aug 10, 2023
1 parent c9fa823 commit 33b9f41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lit_nlp/client/core/app_toolbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,10 @@ export class ToolbarComponent extends MobxLitElement {
}

onClickCopyLink() {
navigator.clipboard.writeText(this.appState.getBestURL());
const url = this.appState.getBestURL();
navigator.clipboard.writeText(url);
// For user; keep this log statement.
console.log('Copied URL to this instance: ', url);
}

renderRightCorner() {
Expand Down
2 changes: 1 addition & 1 deletion lit_nlp/client/services/state_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ export class AppState extends LitService implements StateObservedByUrlService {
* Get best URL for this server.
*/
getBestURL() {
const urlBase = (this.metadata.canonicalURL || window.location.origin);
let urlBase = (this.metadata.canonicalURL || window.location.origin);
return new URL(`${urlBase}${window.location.search}`).href;
}
}

0 comments on commit 33b9f41

Please sign in to comment.