first commit
This commit is contained in:
36
templates/instytut_dendrologii_/js/widokartykulow.js
Normal file
36
templates/instytut_dendrologii_/js/widokartykulow.js
Normal file
@@ -0,0 +1,36 @@
|
||||
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 {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user