mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 03:26:16 +00:00
Update Grid and Square functions
This commit is contained in:
parent
4435325003
commit
ca91809a44
2 changed files with 23 additions and 13 deletions
|
@ -1,11 +1,6 @@
|
|||
function keepSquare() {
|
||||
const images = document.querySelectorAll('.gallery-item');
|
||||
for (let i = 0; i < images.length; i++) {
|
||||
images[i].style.height = images[i].offsetWidth + 'px';
|
||||
}
|
||||
|
||||
const groups = document.querySelectorAll('.group-item');
|
||||
for (let i = 0; i < groups.length; i++) {
|
||||
groups[i].style.height = groups[i].offsetWidth + 'px';
|
||||
let square = document.getElementsByClassName('square')
|
||||
for (let i = 0; i < square.length; i++) {
|
||||
square[i].style.height = square[i].offsetWidth + 'px';
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue