mirror of
https://github.com/SilenceLurker/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 11:15:50 +00:00
Update bindings.js
This commit is contained in:
@@ -21,13 +21,15 @@ function displayDailyAuthCode() {
|
|||||||
const todayCode = getPasswordForDate(new Date());
|
const todayCode = getPasswordForDate(new Date());
|
||||||
displayEl.textContent = todayCode;
|
displayEl.textContent = todayCode;
|
||||||
|
|
||||||
copyBtn.addEventListener('click', () => {
|
if(copyBtn) copyBtn.style.display = 'inline-block';
|
||||||
|
|
||||||
|
copyBtn.onclick = () => {
|
||||||
navigator.clipboard.writeText(todayCode).then(() => {
|
navigator.clipboard.writeText(todayCode).then(() => {
|
||||||
toastr.success('授权码已复制到剪贴板!');
|
toastr.success('授权码已复制到剪贴板!');
|
||||||
}, () => {
|
}, () => {
|
||||||
toastr.error('复制失败,请手动复制。');
|
toastr.error('复制失败,请手动复制。');
|
||||||
});
|
});
|
||||||
});
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user