Difference between revisions of "Widget:Zebra"

From Audacity Wiki
Jump to: navigation, search
(fix calculation.)
(Fix cloudflare issue)
 
Line 219: Line 219:
 
       if( btn.tag ){
 
       if( btn.tag ){
 
           var text =  btn.tag.innerHTML;
 
           var text =  btn.tag.innerHTML;
           text = text.split( "<button onclick=\"if (!window.__cfRLUnblockHandlers) return false; doZebra(this);\">")[0];
+
           text = text.split( "<button onclick=\"doZebra(this);\">")[0];
 
           text = text.replace( /&lt; /g, "&amp;lt; ");
 
           text = text.replace( /&lt; /g, "&amp;lt; ");
 
           text = text.replace( / &gt;/g, " &amp;gt;");
 
           text = text.replace( / &gt;/g, " &amp;gt;");

Latest revision as of 13:24, 9 January 2021


Used to convert a list for zebra striping.

Usage:

Place the list you want in a nowiki section, followed by the Zebra widget. Like so:

 <nowiki>
First Item
Second Item
Third Item Three.
Fourth Item
Fifth Item
Sixth Item
Seventh <Item > TryIt
Eight Item
Ninth Item
Tenth Item
Eleventh Item
Twelfth Item
Thirteenth Item
Fourteenth Item
</nowiki>{{#widget:Zebra}}

Shows As:

First Item
Second Item
Third Item Three.
Fourth Item
Fifth Item
Sixth Item
Seventh <Item > TryIt
Eight Item
Ninth Item
Tenth Item
Eleventh Item
Twelfth Item
Thirteenth Item
Fourteenth Item

 this list.



Another example:

Item One
Item Two
Item Three
Item Four
Item Five
Item Six
Item Seven
Item Eight
Item Nine

 this list.


One with a multiple of five elements:

First Item
Second Item
Third Item Three.
Fourth Item
Fifth Item
Sixth Item
Seventh <Item > TryIt
Eight Item
Ninth Item
Tenth Item

 this list.



11:

First Item
Second Item
Third Item Three.
Fourth Item
Fifth Item
Sixth Item
Seventh <Item > TryIt
Eight Item
Ninth Item
Tenth Item
Eleventh

 this list.



12:

First Item
Second Item
Third Item Three.
Fourth Item
Fifth Item
Sixth Item
Seventh <Item > TryIt
Eight Item
Ninth Item
Tenth Item
Eleventh
Twelfth

 this list.



13:

First Item
Second Item
Third Item Three.
Fourth Item
Fifth Item
Sixth Item
Seventh <Item > TryIt
Eight Item
Ninth Item
Tenth Item
Eleventh
Twelfth
Thirteenth

 this list.



14:

First Item
Second Item
Third Item Three.
Fourth Item
Fifth Item
Sixth Item
Seventh <Item > TryIt
Eight Item
Ninth Item
Tenth Item
Eleventh
Twelfth
Thirteenth
Fourteenth

 this list.


15:

First Item
Second Item
Third Item Three.
Fourth Item
Fifth Item
Sixth Item
Seventh <Item > TryIt
Eight Item
Ninth Item
Tenth Item
Eleventh
Twelfth
Thirteenth
Fourteenth
Fifteenth

 this list.