first commit
This commit is contained in:
34
templates/instytut_dendrologii_/js/mod39.js
Normal file
34
templates/instytut_dendrologii_/js/mod39.js
Normal file
@@ -0,0 +1,34 @@
|
||||
window.addEventListener('load',() => {
|
||||
articleLocation();
|
||||
})
|
||||
|
||||
function articleLocation() {
|
||||
/* document.querySelectorAll('.instytut-historia ul li a').forEach(items => {
|
||||
var newhref=items.href+'#historia-in';
|
||||
items.setAttribute('href',newhref);
|
||||
})
|
||||
|
||||
var page= document.querySelector('.page-header h1').innerHTML;
|
||||
if(page.includes('Pusty')){
|
||||
document.querySelector('.page-header h1').remove();
|
||||
} */
|
||||
|
||||
var czyistnieje= document.querySelector('#historia-in');
|
||||
if(czyistnieje){
|
||||
console.log('Tak istnieje')
|
||||
document.querySelector('#historia-in ul li:last-child').scrollIntoView();
|
||||
|
||||
var link=window.location.href;
|
||||
document.querySelectorAll('.historia-artylul li a').forEach(items => {
|
||||
|
||||
if(link.includes(items.href)){
|
||||
items.style.setProperty('font-weight','600');
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user