Post Web Assets v2 upgrade UI fixes and improvements #114

Merged
Márton Lente merged 35 commits from martonlente/extensions-website:ui/issue105 into main 2024-05-07 16:33:28 +02:00
Showing only changes of commit f27fd7678d - Show all commits

View File

@ -1,5 +1,6 @@
// Create function btnBack (function() {
function btnBack() { // Create function btnBack
function btnBack() {
const btnBack = document.querySelectorAll('.js-btn-back'); const btnBack = document.querySelectorAll('.js-btn-back');
btnBack.forEach(function(item) { btnBack.forEach(function(item) {
@ -8,10 +9,10 @@ function btnBack() {
window.history.back(); window.history.back();
}); });
}); });
} }
// Create finction commentForm // Create finction commentForm
function commentForm() { function commentForm() {
const commentForm = document.querySelector('.js-comment-form'); const commentForm = document.querySelector('.js-comment-form');
if (!commentForm) { if (!commentForm) {
return; return;
@ -42,10 +43,10 @@ function commentForm() {
activitySubmitButton.querySelector('span').textContent = verb; activitySubmitButton.querySelector('span').textContent = verb;
}); });
} }
// Create function copyInstallUrl // Create function copyInstallUrl
function copyInstallUrl() { function copyInstallUrl() {
function init() { function init() {
// Create variables // Create variables
const btnInstall = document.querySelector('.js-btn-install'); const btnInstall = document.querySelector('.js-btn-install');
@ -86,14 +87,15 @@ function copyInstallUrl() {
} }
init(); init();
} }
// Create function init // Create function init
function init() { function init() {
btnBack(); btnBack();
commentForm(); commentForm();
copyInstallUrl(); copyInstallUrl();
} }
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function() {
init(); init();
}); });
}())