Content deleted Content added
m Replaced deprecated <source> tags with <syntaxhighlight> |
|||
(One intermediate revision by one other user not shown) | |||
Line 332:
General usage:
<
mw.util.addPortletLink( 'portletId', 'href', 'text', 'id', 'tooltip', 'accesskey', 'nextnode');
</syntaxhighlight>
It's components:
Line 788:
Hi, {{ping|The Transhumanist}}. I've discovered an unintended side-effect caused by a line of code in your script, or should I say ''the'' line of code.
<
cont.outerHTML = cont.outerHTML.replace(/(<li>.*?)( –.*)/g,'$1<span class="anno">$2</span>');
</syntaxhighlight>
This code strips action handlers from DOM elements which are descendants of <code>mw-content-text</code>. This notably affects 'buttons', such as the 'show/hide' button in the following templates:
Line 798:
{{collapse bottom}}
{{Fragaria|state=expanded}}
You ''might'' be able to prevent this by iterating through <code><li></code> elements, like so:
<
$("#mw-content-text li").each(function()
{
$(this).html($(this).html().replace(/(.*?)( –.*)/g,'$1<span class="anno">$2</span>'));
});
</syntaxhighlight>
Let me know if this helps! Regards, <span style="font-family:Times New Roman">[[User:Guywan|''GUYWAN'']] ( [[User talk:Guywan|''t'']] · [[Special:Contributions/Guywan|''c'']] )</span> 12:20, 6 June 2019 (UTC)
|