Update public source
This commit is contained in:
@@ -199,6 +199,40 @@ function filterTable(id,value)
|
||||
}}
|
||||
}}
|
||||
|
||||
async function copyMapCoordinates(button)
|
||||
{{
|
||||
const coordinates = button.dataset.coordinates;
|
||||
|
||||
if (!coordinates)
|
||||
return;
|
||||
|
||||
const originalText = button.textContent;
|
||||
|
||||
try
|
||||
{{
|
||||
if (!navigator.clipboard || !navigator.clipboard.writeText)
|
||||
throw new Error("Clipboard API unavailable");
|
||||
|
||||
await navigator.clipboard.writeText(coordinates);
|
||||
|
||||
button.textContent = "Скопировано";
|
||||
|
||||
setTimeout(() =>
|
||||
{{
|
||||
button.textContent = originalText;
|
||||
}}, 1500);
|
||||
}}
|
||||
catch (error)
|
||||
{{
|
||||
button.textContent = "Ошибка копирования";
|
||||
|
||||
setTimeout(() =>
|
||||
{{
|
||||
button.textContent = originalText;
|
||||
}}, 2000);
|
||||
}}
|
||||
}}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user