MediaWiki:Common.js: відмінності між версіями

нема опису редагування
Немає опису редагування
Немає опису редагування
Рядок 75: Рядок 75:
});
});


// Profile links click handler
// Profile icons - grayscale if no URL, clickable if has URL
document.querySelectorAll('.profile-icon').forEach(function(icon) {
document.querySelectorAll('.profile-icon').forEach(function(icon) {
     var url = icon.getAttribute('data-url');
     var url = icon.getAttribute('data-url');
Рядок 83: Рядок 83:
             window.open(url, '_blank');
             window.open(url, '_blank');
         });
         });
        icon.addEventListener('mouseenter', function() {
            icon.style.background = '#444';
        });
        icon.addEventListener('mouseleave', function() {
            icon.style.background = '#333';
        });
    } else {
        icon.style.opacity = '0.3';
        icon.style.filter = 'grayscale(100%)';
        icon.style.cursor = 'default';
     }
     }
});
});