36 lines
893 B
JavaScript
36 lines
893 B
JavaScript
window.addEventListener('load', () => {
|
|
// redirectView();
|
|
})
|
|
|
|
function redirectView() {
|
|
if (document.querySelector(':root').hasAttribute('style')) {
|
|
var headstyle = document.querySelector(':root').getAttribute('style');
|
|
if (headstyle.includes('content')) {
|
|
console.log('Prawda');
|
|
|
|
document.querySelectorAll('.posts-2 a,.posts-3 a,.posts-4 a,.posts-5 a,.posts-6 a,.posts-7 a,.posts-8 a,.posts-9 a,.posts-10 a,.posts-11 a,.posts-12 a').forEach(links => {
|
|
var linkczytaj = links.innerHTML;
|
|
|
|
if (linkczytaj.includes('ięce')) {
|
|
|
|
console.log(linkczytaj + 'ten link zawiera');
|
|
links.setAttribute('href', '/strona-glowna' + links.getAttribute('href'));
|
|
|
|
|
|
}
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
}
|
|
} else {
|
|
|
|
}
|
|
|
|
} |