MCPcopy Create free account
hub / github.com/Ashutosh00710/github-readme-activity-graph / copyLink

Function copyLink

script.js:308–325  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

306
307// Copy to clipboard
308const copyLink = () => {
309 if (elements.textArea.value !== '') {
310 let copyBtn = elements.copyText.childNodes[3];
311 if (copyBtn.style.backgroundColor === 'rgb(87, 132, 245)') {
312 const copiedText = elements.textArea.value;
313 navigator.clipboard.writeText(copiedText);
314 const input = elements.copyText.querySelector('input.text');
315 input.select();
316
317 copyBtn.style.backgroundColor = '#2bbe60';
318 elements.copyText.classList.add('active');
319
320 setTimeout(() => {
321 elements.copyText.classList.remove('active');
322 }, 2500);
323 }
324 }
325};
326
327//Event Handlers
328

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected