MediaWiki:CharInsert.js
Uwaga: aby zobaczyć zmiany po opublikowaniu, może zajść potrzeba wyczyszczenia pamięci podręcznej przeglądarki.
- Firefox / Safari: Przytrzymaj Shift podczas klikania Odśwież bieżącą stronę, lub naciśnij klawisze Ctrl+F5, lub Ctrl+R (⌘-R na komputerze Mac)
- Google Chrome: Naciśnij Ctrl-Shift-R (⌘-Shift-R na komputerze Mac)
- Internet Explorer / Edge: Przytrzymaj Ctrl, jednocześnie klikając Odśwież, lub naciśnij klawisze Ctrl+F5
- Opera: Naciśnij klawisze Ctrl+F5.
function specialchar(text)
{
var actions = $(document).find('div[rel="characters"]').data('actions', {});
$(document).find('div[rel="characters"].section div[rel="symbols"].page div')[0].appendChild(
$($.wikiEditor.modules.toolbar.fn.buildCharacter(text, actions)).on('click', function (e)
{
$.wikiEditor.modules.toolbar.fn.doAction(
$(this).parent().data('context'),
actions[$(this).attr('rel')]);
e.preventDefault();
return false;
})[0]);
}
(function()
{
$('span.charinsert').each(function()
{
var span = $(this)[0], text = span.textContent;
specialchar(text);
span.onclick = function()
{
$(document).find('div[rel="characters"].section div[rel="symbols"].page div span[rel="'+text+'"]').click();
};
});
}());