diff --git a/build.html b/build.html
index 546b32c3c..ce1b9e64d 100644
--- a/build.html
+++ b/build.html
@@ -2,202 +2,202 @@
- TDLib build instructions
-
+ #copyBuildCommandsButton {
+ margin-left: 40px;
+ }
+ #copyBuildCommandsButton.success {
+ background: var(--color-copy-success-background);
+ border-color: var(--color-copy-success-border);
+ }
+ #copyBuildCommandsButton.fail {
+ background: var(--color-copy-fail-background);
+ border-color: var(--color-copy-fail-border);
+ }
+ #copyBuildCommandsButton .notice {
+ font-size: 14px;
+ font-weight: bold;
+ margin-left: 5px;
+ color: var(--color-copy-warning);
+ display: none;
+ }
+ #copyBuildCommandsButton:hover .notice,
+ #copyBuildCommandsButton:focus .notice {
+ display: inline;
+ }
+
@@ -1096,25 +1096,25 @@ function onOptionsChanged() {
}
commands.push((use_powershell ? 'dir ' : 'ls -l ') + install_dir);
}
- document.getElementById('buildCommands').innerHTML = '- ' + commands.join('
- ') + '
'
+ document.getElementById('buildCommands').innerHTML = '- ' + commands.join('
- ') + '
';
}
function copyBuildInstructions() {
- var text= document.getElementById('buildCommands').innerText;
+ var text = document.getElementById('buildCommands').innerText;
function resetButtonState (state) {
document.getElementById('copyBuildCommandsButton').classList.remove(state);
- document.getElementById('copyBuildCommandsText').innerText= "Copy"
+ document.getElementById('copyBuildCommandsText').innerText = "Copy";
}
-
+
navigator.clipboard.writeText(text).then(result => {
document.getElementById('copyBuildCommandsButton').classList.add('success');
- document.getElementById('copyBuildCommandsText').innerText= "Copied!"
- setTimeout(()=> resetButtonState('success'), 5000);
+ document.getElementById('copyBuildCommandsText').innerText = "Copied!";
+ setTimeout(() => resetButtonState('success'), 5000);
}, error => {
document.getElementById('copyBuildCommandsButton').classList.add('fail');
- document.getElementById('copyBuildCommandsText').innerText= "Couldn't copy :("
- setTimeout(()=> resetButtonState('fail'), 5000);
+ document.getElementById('copyBuildCommandsText').innerText = "Couldn't copy :(";
+ setTimeout(() => resetButtonState('fail'), 5000);
})
}