first commit
This commit is contained in:
21
templates/instytut_dendrologii_/js/alty.js
Normal file
21
templates/instytut_dendrologii_/js/alty.js
Normal file
@@ -0,0 +1,21 @@
|
||||
window.addEventListener('load', () => {
|
||||
|
||||
alts1();
|
||||
})
|
||||
|
||||
function alts1(){
|
||||
document.querySelectorAll('.stones p img').forEach(ima =>{
|
||||
var imaa=ima.src.replace('https://instytut.grupaww.jchost09.pl/images/Arboretum/fotoaktualnosci/','').replace('.webp','');
|
||||
|
||||
document.querySelectorAll('.wzwo a').forEach(lapt => {
|
||||
|
||||
if(lapt.href.includes(imaa)){
|
||||
console.log('te alty'+lapt.href);
|
||||
ima.setAttribute('alt',lapt.innerHTML);
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user