Sha256: 32133942c1f7577d7c64709eec05b3ccd5b63130dce8a9a5dc45bf79f72ca2f4
Contents?: true
Size: 718 Bytes
Versions: 4
Compression:
Stored size: 718 Bytes
Contents
(function(d){d.extend({metadata:{defaults:{type:"class",name:"metadata",cre:/({.*})/,single:"metadata"},setType:function(c,a){this.defaults.type=c;this.defaults.name=a},get:function(c,a){a=d.extend({},this.defaults,a);if(!a.single.length)a.single="metadata";var b=d.data(c,a.single);if(b)return b;b="{}";if(a.type=="class"){var e=a.cre.exec(c.className);if(e)b=e[1]}else if(a.type=="elem"){if(!c.getElementsByTagName)return;e=c.getElementsByTagName(a.name);if(e.length)b=d.trim(e[0].innerHTML)}else if(c.getAttribute!= undefined)if(e=c.getAttribute(a.name))b=e;if(b.indexOf("{")<0)b="{"+b+"}";b=eval("("+b+")");d.data(c,a.single,b);return b}}});d.fn.metadata=function(c){return d.metadata.get(this[0],c)}})(jQuery);
Version data entries
4 entries across 4 versions & 1 rubygems