nic comment:
hey. thank u for that awesome plugin. how can i download the smilie package? i want to host them on my webspace because i want to be independet from other hosters.
I have recently updated my jQuery plugin, called jSmile, and the biggest news is that it does not require anymore external resources.
Thanks to inline uri data, the script now comes "full optionals", or better, with base64 encoded GIFs images included.
Instead of external CSS classes, images, and cross host dependencies, jSmile can now easily be integrated in every http or https site, and without network delays.
Its size is obviously bigger than before, but using a minifier and gzip compression, it fits perfectly under 7Kb.
Compatibility
- Chrome
- FireFox
- Internet Explorer 8
- Opera
- Safari
- WebKit
Enjoy ;)
Hello, Andrea. Thank you for such great plugin.
ReplyDeleteWant to add my 5 cents:
plugin does not properly get with such construction:
< p >bla-bla-bla (smile1)< BR > bla-bla-bla (smile2)< /p >
smile2 - won't be managed at all
after several hours of brainfuck:
---------------------------------
this.each(function(x, firstChild){
if (!firstChild.childNodes.length) return;
var Children=firstChild.childNodes[0];
do {
if (typeof smile.nodeName[Children.nodeName.toLowerCase()]=='undefined'){
switch(Children.nodeType){
case 1:
show ? jQuery(Children).smile(show) : smile.remove(Children);
break;
case 3:
if(show)
Children=smile.add(Children);
break;
}
}
} while (Children=Children.nextSibling);
});
-----------------------------
and below after "nodeValue.replace(...);" :
----------------------
var newChild=firstChild;
if(i) {
newChild=document.createTextNode(nodeValue.substring(i));
jQuery(firstChild).before(newChild);
parentNode.removeChild(firstChild);
}
return newChild;
---------------------------
now it's take a little less memory and run a little bit faster.