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

Вилучено вміст Додано вміст
Bene* (обговорення | внесок)
Мітка: перше редагування
Amire80 (обговорення | внесок)
→‎ContentTranslation: нова тема
Рядок 45:
 
Hi! I want to let you know that in near future badges will be deployed on Wikidata and the Wikipedias. They help us with displaying the good and featured article icons next to the sitelinks and will replace the javascript hack which is used at the moment together with the Link GA and Link FA templates. To avoid an overlap where the current system and the new feature conflict, I will add a minor fix to your Common.js which adds the class names to the interwiki links. This is part of my task as a [//meta.wikimedia.org/w/index.php?title=Steward_requests/Global_permissions&oldid=9433288#Global_editinterface_for_Bene.2A global edit interface editor] for the Wikidata team. Thanks, [[Користувач:Bene*|Bene*]] ([[Обговорення користувача:Bene*|обговорення]]) 20:31, 18 серпня 2014 (UTC)
 
== ContentTranslation ==
 
Здравствуйте,
 
У вас тут есть проблемка, которая немножко мешает расширению ContentTranslation: в конце document.getElementById('t-upload') не работает, потому что на Special:ContentTranslation нет такого элемента.
 
Лучше написать так:
<syntaxhighlight lang="JavaScript">
$( '#t-upload' ).find( 'a' ).prop( {
href: '/wiki/Вікіпедія:Майстер завантаження файлів'
} );
</syntaxhighlight>
 
В таком виде, даже если элемента нет, не будет ошибок.
 
Спасибо! --[[Користувач:Amire80|Amir E. Aharoni]] ([[Обговорення користувача:Amire80|обговорення]]) 20:12, 13 червня 2015 (UTC)
Повернутися до сторінки «Common.js»