34 lines
798 B
JavaScript
34 lines
798 B
JavaScript
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');
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
} |