Skip to content

Commit

Permalink
compatibility clipboard #23
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander171294 committed Jan 28, 2022
1 parent 4ad5dc8 commit 95a78a3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion src/app/utils/clipboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,20 @@ export class Clipboard {
navigator.clipboard.writeText(textToCopy);
return true;
} else {
return false;
const el = document.createElement('textarea');
el.value = textToCopy;
el.setAttribute('readonly', '');
el.style.position = 'absolute';
el.style.left = '-9999px';
document.body.appendChild(el);
el.select();
try {
document.execCommand('copy');
} catch(e) {
return false;
}
document.body.removeChild(el);
return true;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const environment = {
production: true,
uDataApi: 'https://udata-steam.core.tandilserver.com',
version: 'v1.2.9'
version: 'v1.3.0'
};

0 comments on commit 95a78a3

Please sign in to comment.