Gallery improvements (#4789)

This commit is contained in:
Lounger 2023-12-04 02:45:50 +01:00 committed by GitHub
parent 77d6ccf12b
commit 7c0a17962d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 51 additions and 16 deletions

View file

@ -5,6 +5,13 @@ let extensions_block = document.getElementById('extensions');
let extensions_block_size = extensions_block.childNodes.length;
let gallery_only = (extensions_block_size == 5);
function gotoFirstPage() {
const firstPageButton = gallery_element.querySelector('.paginate > button');
if (firstPageButton) {
firstPageButton.click();
}
}
document.querySelector('.header_bar').addEventListener('click', function(event) {
if (event.target.tagName === 'BUTTON') {
const buttonText = event.target.textContent.trim();