MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
$(document).ready(function() {
    $('.copyable-text').on('click', function() {
        var textToCopy = $(this).text(); // Получаем текст элемента
        navigator.clipboard.writeText(textToCopy).then(function() {
            // Добавляем класс .copied для показа уведомления
            $(this).addClass('copied');
        }.bind(this), function(err) {
            console.error('Ошибка при копировании текста: ', err);
        });
    });
});
/* MediaWiki:Common.js */
$(document).ready(function() {
    // Находим все ссылки с rel="discussion" и меняем атрибут title
    $('a[rel="discussion"]').attr('title', 'Comment the article [alt+shift t]');
});
document.addEventListener('DOMContentLoaded', function () {
document.addEventListener('DOMContentLoaded', function () {
     var elements = document.querySelectorAll('body *'); // Выбираем все элементы на странице
     var elements = document.querySelectorAll('body *'); // Выбираем все элементы на странице

Navigation menu

Help

Help Image

Here's pages that you can help us to get more information about them.

Stand with Ukraine

Ukrainian Flag