JQueryShrinkUrls
System
---+ %TOPIC% %JQPLUGINS{"shrinkurls" format=" Homepage: $homepage <br /> Author(s): $author <br /> Version: $version " }% %STARTSECTION{"summary"}% Shrinks all urls in a given container whose link text exceeds a given size and have no white spaces in it, that is don't wrap around nicely. If the text is skrunk, the original text is appended to the title attribute of the anchor. %ENDSECTION{"summary"}% ---++ Usage ---+++ !JavaScript API <verbatim class="js"> $("#container a").shrinkUrls({ size:<number>, // max size (default 25) include:'<regex>' // regular expression a link text must // match to be considered exclude:'<regex>' // regular expression a link text must // not match to be considered whitespace:<boolean>, // true: even shrink if there's whitespace // in the link text (default false) trunc:<head|middle|tail> // position where to insert the ellipsis }); </verbatim> ---+++ Foswiki integration Add the class name ==jqShrinkUrls== to a container to process all anchors inside. <verbatim class="tml"> %JQREQUIRE{"shrinkurls"}% <div class="jqShrinkUrls {size:25, whitespace:true}"> <a href="#">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam vehicula est et felis imperdi</a> </div> </verbatim> ---++ Examples %JQREQUIRE{"shrinkurls"}% <div class="jqShrinkUrls {size:25, whitespace:true}"> <a href="#">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam vehicula est et felis imperdi</a> </div> <div class="jqShrinkUrls {size:25, whitespace:true, trunc:'middle'}"> <a href="#">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam vehicula est et felis imperdi</a> </div> <div class="jqShrinkUrls {size:25, whitespace:true, trunc:'head'}"> <a href="#">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam vehicula est et felis imperdi</a> </div>
E
dit
•
A
ttach
•
P
rint version
•
H
istory
: r1
•
B
acklinks
•
V
iew topic
•
M
ore topic actions
Projects
Skin Browser
Need to add skin selector, and then appropriate details
WidgetsSkin
options:
Wide
Wide - Thin
Thin - Wide
Thin - Wide - Thin
Wide - Thin - Thin
Wide - Medium
Medium - Wide
System Changes
WebCreateNewTopicTemplate
WebTemplateTopics
WebSearch
WebHome
WikiWord
WikiSyntax
WikiName
WikiSyntaxSummary
WikiCulture
WelcomeGuest
WebNotifyHelp
WebNotify
WebRssBase
WebRss
WebPreferencesHelp
powered by the community. 28th October 2008.