140charsJS (@140charsJS) profile picture

{ me: undefined }

Joined August 2011
Watch your semicolons! a=function(){alert("Doug is not right")} (function(){ alert("sometimes"); }()); Surprised? :-)
1
FF killer (no "stop script" popup when executed from FireBug): (function(){eval(arguments.callee.toSource())()})()
Email spam from M$-"Purchase VisualStudio"-link took me to: spe.atdmt.com/images/pixel.g…. I understood why VStudio and JSLint work well together...
If you place any tag between TDs (invalid HTML), IE will wrap it with mysterious empty tag (nodeType 1, tagName "") which is in fact CAPTION
document.getElementsByTagName("") can produce non empty result on bloody IE. For what HTLM tags?
Bartaz, your brain-based JS interpreter works perfectly! Yes, JSON.stringify in 139 chars. Dare to make it shorter or without limitations?
1
1
function x(o){s='';if(o&&Object(o)===o)for(k in o)s+=(s?",":o.pop?"][":"}{")+(+k+1?"":x(k)+':')+x(o[k]);return s?s.slice(1)+s[0]:'"'+o+'"'}
1
Right, @bartaz. So finally instead of +"1" on IE we are getting +"v1", which obviously is NaN. Then !NaN and voila!
Browser recognition sucks, but... interesting stuff: isIE = !+"\v1"; Do you understand how it works? :-)
1
Unfortunately V8 in current Node.JS(where I was testing)still don't have that change.But great Google realized it was a crap.Thx @reinmarpl
1
Replying to @140charsJS
@140charsJS on old V8 - true. But they've changed this stupid behavior. No it is an object and it is not callable. Same in Fx.
/js/i('140charsJS') - RegExp is callable object on V8 (works like exec method). Be careful: typeof /.+/ === 'function'
1
A=[].reduce,b="childNodes";A.call(document[b],function f(z,n){return Math.max(n.style?+n.style.zIndex:0,n[b]?A.call(n[b],f,z):0,z);},0);
Replying to @140charsJS
@140charsJS hex to rgb: "#00FF00".match(/(\w{2})/gi).map(function(n){return parseInt(n,16);});
Right, @bartaz - it is base62. The code found here: http://t.co/wWbpNGCz (after @140bytes) For sure can be optimized (yeah, that's for you)
function(a,b,c){for(a=a!==+a||a%1?-1:a,b="";a>=0;a=Math.floor(a/62)||-1)b=String.fromCharCode(((c=a%62)>9?c>35?29:87:48)+c)+b;return b}
1
Perfect, @bartaz - it is an object elements accessor. Example: f({a:{b:{c:[1,2]}}},'a.b.c.0') or f({a:{b:{c:[1,2]}}},'a.x.y.z')===undefined