Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
Make invisibleTagAttrs a user-settable options
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Hoffman-Andrews committed Mar 29, 2012
1 parent c770d03 commit 11ff789
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion twitter-text.js
Expand Up @@ -505,7 +505,7 @@ if (typeof twttr === "undefined" || twttr === null) {
// <span style='font-size:0'>&nbsp;</span>
// …
// </span>
v['invisible'] = "style='position:absolute;left:-999px;'";
v['invisible'] = options.invisibleTagAttrs;
linkText = stringSupplant("<span class='tco-ellipsis'>#{precedingEllipsis}<span #{invisible}>&nbsp;</span></span><span #{invisible}>#{beforeDisplayUrl}</span><span class='js-display-url'>#{displayUrlSansEllipses}</span><span #{invisible}>#{afterDisplayUrl}</span><span class='tco-ellipsis'><span #{invisible}>&nbsp;</span>#{followingEllipsis}</span>", v);
} else {
linkText = displayUrl;
Expand Down Expand Up @@ -539,6 +539,7 @@ if (typeof twttr === "undefined" || twttr === null) {
options.listUrlBase = options.listUrlBase || "https://twitter.com/";
options.before = options.before || "";
options.htmlAttrs = twttr.txt.extractHtmlAttrsFromOptions(options);
options.invisibleTagAttrs = options.invisibleTagAttrs || "style='position:absolute;left:-9999px;'";

// remap url entities to hash
var urlEntities, i, len;
Expand Down

0 comments on commit 11ff789

Please sign in to comment.