8,554
edits
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 *'); // Выбираем все элементы на странице |