[SPAM] Re: The wow of the Universal SignWriting Plugins
Eduardo Trápani
etrapani at GMAIL.COM
Tue Apr 9 03:24:58 UTC 2013
> I'm excited. The realization of an idea and explosive new
> possibilities. Introducing the Universal SignWriting Plugins.
> http://signpuddle.com
Great! I love it!
Thanks for the zip with the template. It is sooo simple to make it work!
Just a comment. The images are placed as background, and that means
(for my Firefox and Chrome at least) that they will not be printed.
I changed the second line to include the images inside the div and (see
at the end) it works, and I can now print! That's a quick hack, I guess
the actual solution is not that simple ;), but that does the trick.
Could you change the code as to allow the pages to be printed?
I simply LOVE this, congratulations!
Eduardo.
signwriting_thin = (function(){var
u,s1,s2,d,p,r,r2,o,f;u='http://swis.wmflabs.org/';r=/[BLMR]([0-9]{3}x[0-9]{3})(S[123][0-9a-f]{2}[0-5][0-9a-f][0-9]{3}x[0-9]{3})*|S38[7-9ab][0-5][0-9a-f][0-9]{3}x[0-9]{3}/g;r2=/[0-9]{3}x[0-9]{3}/g;o={};o.L=-1;o.R=1;f=function(m){var
x,x1=500,x2=500,y,y1=500,y2=500,k,w,h,l;k=m.charAt(0);m.replace(r2,function($0){x=parseInt($0.slice(0,3));y=parseInt($0.slice(4,7));x1=Math.min(x1,x);x2=Math.max(x2,x);y1=Math.min(y1,y);y2=Math.max(y2,y);});if(k=='S'){x2=1000-x1;y2=1000-y1;}w=x2-x1;h=y2-y1;l=o[k]||0;l=l*75+x1-400;return
'<div
style="padding:10px;position:relative;background-repeat:no-repeat;background-origin:content-box;width:'+w+'px;height:'+h+'px;left:'+l+'px;"><span
style="display:table-cell;vertical-align:middle;font-size:0%;height:inherit;">'+m+'<img
src=\''+u+'glyphogram.php?font=svg&text='+m+'\'>
</span></div>';};function
fswReplace(node){node=node||document.body;if(node.nodeType==3){s1=node.nodeValue;s2=s1.replace(r,f);if(s1!=s2){p=node.parentNode;d=document.createElement('div');d.innerHTML=s2;p.replaceChild(d,node);}}else{var
nodes=node.childNodes;if(nodes){var
i=nodes.length;while(i--)fswReplace(nodes[i]);}}};fswReplace();});
More information about the Sw-l
mailing list