MediaWiki:CharInsert.js: Różnice pomiędzy wersjami
Przejdź do nawigacji
Przejdź do wyszukiwania
Nie podano opisu zmian |
Nie podano opisu zmian |
||
| Linia 23: | Linia 23: | ||
var span = $(this)[0], text = span.textContent; | var span = $(this)[0], text = span.textContent; | ||
specialchar(text); | specialchar(text); | ||
span. | span.click(function() | ||
{ | { | ||
$(document).find('div[rel="characters"].section div[rel="symbols"].page div span[rel="'+text+'"]').click(); | $(document).find('div[rel="characters"].section div[rel="symbols"].page div span[rel="'+text+'"]').click(); | ||
}; | }); | ||
}); | }); | ||
}()); | }()); | ||
Wersja z 08:14, 16 mar 2024
function specialchar(text)
{
$(document).find('div.sections div[rel="characters"].section div.index div[rel="symbols"]').click();
var actions = $(document).find('div.sections div[rel="characters"].section').data('actions', {});
setTimeout(() =>
{
$(document).find('div.sections div[rel="characters"].section div.pages 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]);
}, 1000);
}
(function()
{
$('span.charinsert').each(function()
{
var span = $(this)[0], text = span.textContent;
specialchar(text);
span.click(function()
{
$(document).find('div[rel="characters"].section div[rel="symbols"].page div span[rel="'+text+'"]').click();
});
});
}());