Усилить безопасность веб-интерфейса
This commit is contained in:
@@ -207,6 +207,17 @@ async function exportWorkspaceSnapshot() {
|
||||
async function initPage() {
|
||||
updatePageMode();
|
||||
|
||||
document.querySelectorAll('.ws-color-swatch').forEach(function(swatch) {
|
||||
swatch.addEventListener('click', function() { pickColor(swatch); });
|
||||
});
|
||||
document.querySelectorAll('[data-history-back]').forEach(function(button) {
|
||||
button.addEventListener('click', function() { window.history.back(); });
|
||||
});
|
||||
var elements = formElements();
|
||||
elements.name.addEventListener('input', function(event) { onWsNameInput(event.target.value); });
|
||||
elements.slug.addEventListener('input', function(event) { onWsSlugInput(event.target.value); });
|
||||
elements.submit.addEventListener('click', submitForm);
|
||||
|
||||
var exportButton = document.getElementById('export-workspace-btn');
|
||||
if (exportButton) {
|
||||
exportButton.addEventListener('click', exportWorkspaceSnapshot);
|
||||
|
||||
Reference in New Issue
Block a user