Merge remote-tracking branch 'origin/develop'

This commit is contained in:
Konstantinos Triantafyllou 2023-06-28 11:47:59 +03:00
commit c94a24a984
2 changed files with 23 additions and 0 deletions

BIN
common/Logo_Small.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

23
js/copy.js Normal file
View File

@ -0,0 +1,23 @@
var copy= {
exec: (id) => {
var element = document.getElementById(id);
if (document.body.createTextRange) {
range = document.body.createTextRange();
range.moveToElementText(element);
range.select();
} else if (window.getSelection) {
selection = window.getSelection();
range = document.createRange();
range.selectNodeContents(element);
selection.removeAllRanges();
selection.addRange(range);
}
try {
document.execCommand('copy');
return true;
} catch (err) {
console.error('unable to copy text');
return false;
}
}
}