Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add button to copy device IP from Brighterscript Language > Devices #437

Open
arturocuya opened this issue Sep 16, 2022 · 4 comments
Open

Comments

@arturocuya
Copy link
Collaborator

There's only a button to open the IP on a browser, but no button to copy the IP. Would be nice to have a 1-click for this.

image

@arturocuya
Copy link
Collaborator Author

I'll work on this when I have time, next weekend probably. Just wanted to create an issue for tracking.

@TwitchBronBron
Copy link
Member

Great, thanks!

Here's the relevant section of code you'll need to modify.

for (let property in element.details) {

@philanderson888
Copy link
Contributor

var text = "Example text to appear on clipboard";
navigator.clipboard.writeText(text).then(function() {
  console.log('Copying to clipboard was successful!');
}, function(err) {
  console.error('Could not copy text: ', err);
});

@philanderson888
Copy link
Contributor

philanderson888 commented Jan 30, 2025

async function copyContent() {
  try {
    await navigator.clipboard.writeText('This is the text to be copied');
    console.log('Content copied to clipboard');
  } catch (err) {
    console.error('Failed to copy: ', err);
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants