|
127 | 127 | //$("#onlineTerminal").focus(); |
128 | 128 | },500); |
129 | 129 | } |
130 | | - ga( 'send', 'event', 'toys', 'terminal', 'open'); |
| 130 | + //ga( 'send', 'event', 'toys', 'terminal', 'open'); |
131 | 131 |
|
132 | 132 | if( typeof game !== 'undefined' && typeof game.paused !== 'undefined' ) { |
133 | 133 | GameCycle.disableGameControls(); |
|
282 | 282 | if ((e.which == 65) && (kc_count == 9)) { kc_count++; } |
283 | 283 | if (kc_count == 10) { |
284 | 284 | $('main').append($('<img src="static/images/miley1.png" onload="$(this).animate({ left: $(window).width()+150 }, 2000, function() { $(this).remove(); })" style="position:absolute;left:-150px;top:'+($(window).scrollTop()+100)+'px;"/>')); |
285 | | - ga( 'send', 'event', 'toys', 'terminal', 'upupdowndownleftrightleftrightba'); |
| 285 | + //ga( 'send', 'event', 'toys', 'terminal', 'upupdowndownleftrightleftrightba'); |
286 | 286 | }; |
287 | 287 | if (resetkc) kc_count = 0; |
288 | 288 | }); |
|
295 | 295 | if (func_options == "clear") { |
296 | 296 | $('.dogeText').remove(); |
297 | 297 | } else { |
298 | | - av_doge_texts = Array('wow', 'much code', 'much JS', 'so JS', 'so code', 'very JS', 'very programmer', 'd0g3 l337 h4x0r', 'wow', 'wow'); |
| 298 | + av_doge_texts = Array('wow', 'much code', 'much CodeCell', 'so CodeCell', 'so code', 'very CodeCell', 'very programmer', 'd0g3 l337 h4x0r', 'wow', 'wow'); |
299 | 299 | av_doge_colors = Array('red', 'blue', 'yellow', 'pink', 'orange', 'green', 'purple', 'cyan'); |
300 | | - $("body").append('<div style="font-family:\'Comic Sans MS\', cursive, sans-serif;font-size:70px;line-height:44px;position:absolute;top:'+(Math.floor(Math.random()*$(window).height()+$(document).scrollTop()-300)+100)+'px;left:'+(Math.floor(Math.random()*$(window).width()-400)+100)+'px;color:'+av_doge_colors[Math.floor(Math.random()*av_doge_colors.length)]+'" class="dogeText">'+av_doge_texts[Math.floor(Math.random()*av_doge_texts.length)]+'</div>'); |
| 300 | + $("body").append('<div style="font-family:\'Comic Sans MS\', cursive, sans-serif;font-size:70px;line-height:44px;position:absolute;z-index:300;top:'+(Math.floor(Math.random()*$(window).height()+$(document).scrollTop()-300)+100)+'px;left:'+(Math.floor(Math.random()*$(window).width()-400)+100)+'px;color:'+av_doge_colors[Math.floor(Math.random()*av_doge_colors.length)]+'" class="dogeText">'+av_doge_texts[Math.floor(Math.random()*av_doge_texts.length)]+'</div>'); |
301 | 301 | } |
302 | 302 | $("#onlineTerminal").html($("#onlineTerminal").html().trim()+'<span class="response">wow very random</span>'+breakLine()+breakLine()); |
303 | | - ga( 'send', 'event', 'toys', 'terminal', 'doge'); |
| 303 | + //ga( 'send', 'event', 'toys', 'terminal', 'doge'); |
304 | 304 | return null; |
305 | 305 | } |
306 | 306 | function dancer(func_options) { |
|
311 | 311 | $("body").append('<img style="position:absolute;top:'+Math.floor(Math.random()*$(window).height()+$(document).scrollTop())+'px;left:'+Math.floor(Math.random()*$(window).width())+'px;" src="static/images/dancers/'+(Math.floor(Math.random()*8)+1)+'.gif" alt="" class="gifDancers"/>'); |
312 | 312 | } |
313 | 313 | $("#onlineTerminal").html($("#onlineTerminal").html().trim()+'<span class="response">I don\'t feel like dancing, no sir, no dancing today.</span>'+breakLine()+breakLine()); |
314 | | - ga( 'send', 'event', 'toys', 'terminal', 'dancer'); |
| 314 | + //ga( 'send', 'event', 'toys', 'terminal', 'dancer'); |
315 | 315 | } |
316 | 316 | function help(customFunctionName) { |
317 | 317 | if (typeof customFunctionName === "undefined") { |
|
350 | 350 | if (customFunctionName == 'weather') response = 'Shows the weather forecast for the two days of JSConf 2014. It will be available only 5 days before the event.'; |
351 | 351 | } |
352 | 352 | $("#onlineTerminal").html($("#onlineTerminal").html().trim()+'<span class="response">'+response+'</span>'+breakLine()+breakLine()); |
353 | | - ga( 'send', 'event', 'toys', 'terminal', 'help'); |
| 353 | + ////ga( 'send', 'event', 'toys', 'terminal', 'help'); |
354 | 354 | } |
355 | 355 | function planetarium() { |
356 | 356 | $(".planetarium").click(); |
|
384 | 384 | function comicSans() { |
385 | 385 | $('*').css({"font-family": '"Comic Sans MS", cursive, sans-serif'}) |
386 | 386 | $("#onlineTerminal").html($("#onlineTerminal").html().trim()+'<span class="response">But... WHY?</span>'+breakLine()+breakLine()); |
387 | | - ga( 'send', 'event', 'toys', 'terminal', 'comicSans'); |
| 387 | + //ga( 'send', 'event', 'toys', 'terminal', 'comicSans'); |
388 | 388 | } |
389 | 389 | function helvetica() { |
390 | 390 | $('*').css({"font-family": '"Helvetica", cursive, sans-serif'}) |
391 | 391 | $("#onlineTerminal").html($("#onlineTerminal").html().trim()+'<span class="response">I used Helvetica before it was cool.</span>'+breakLine()+breakLine()); |
392 | | - ga( 'send', 'event', 'toys', 'terminal', 'helvetica'); |
| 392 | + //ga( 'send', 'event', 'toys', 'terminal', 'helvetica'); |
393 | 393 | } |
394 | 394 | function ieLove(func_options) { |
395 | 395 | if(typeof(func_options) === 'undefined') func_options = ''; |
|
433 | 433 | } |
434 | 434 | } |
435 | 435 | $("#onlineTerminal").html($("#onlineTerminal").html().trim()+'<span class="response">Oh... IE, we love you anyway.</span>'+breakLine()+breakLine()); |
436 | | - ga( 'send', 'event', 'toys', 'terminal', 'ieLove'); |
| 436 | + //ga( 'send', 'event', 'toys', 'terminal', 'ieLove'); |
437 | 437 | } |
438 | 438 | function weather() { |
439 | 439 | var fiveDaysBeforeJSConf = new Date(2014, 11, 24); |
|
462 | 462 | setEndOfContenteditable(document.getElementById("onlineTerminal")); |
463 | 463 | }); |
464 | 464 | //} |
465 | | - ga( 'send', 'event', 'toys', 'terminal', 'weather'); |
| 465 | + //ga( 'send', 'event', 'toys', 'terminal', 'weather'); |
466 | 466 | } |
467 | 467 | function exit() { |
468 | 468 | $('.terminalHandle').click(); |
|
484 | 484 | var loremipsum=["Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna."];var whitespaceAtFrontRe=/^[\s\xa0]+/;var whitespaceAtEndRe=/[\s\xa0]+$/;var punctationRe=/([:!?\.])$/;var punctationFrontRe=/^([:!?\.]\s+)/;var capatializedRe=/^[^\wÄÖÜÀÀÃÈÉÇ]*[A-ZÄÖÜÀÀÃÈÉÇ]/;var simpleExpressionRe=/^[\(\[]?.[:\.\)\]]?$/;var singleWordRe=/^\w*$/;var charAtFrontRe=/^[a-z]/i;var headlineRe=/^H[1-3]$/i;var lastTextHadPunctation=false;var foundMain=false;var idx=0;var getLoremIpsum=function(e,t,n){if(!foundMain&&t){idx=0;foundMain=true}var r=loremipsum[idx];var i=r.length;while(i<e){if(++idx>=loremipsum.length)idx=0;r+=" "+loremipsum[idx];i=r.length}if(i>e){var s=r.substring(0,e);var o=r.substring(e).replace(/\s.*$/,"");if(!n&&(o.length<3||singleWordRe.test(s)&&charAtFrontRe.test(r.charAt(e)))){r=s+o}else{r=s.replace(/,?\s\w*$/,"")}if(r.length>3)r=r.replace(/\s\w$/,"")}r=r.replace(/\s+$/,"");if(++idx>=loremipsum.length)idx=0;return r};var replaceText=function(e,t){var n=e.nodeValue;if(!n)return;var r=n.length;n=n.replace(whitespaceAtFrontRe,"");var i=n.length!=r;r=n.length;n=n.replace(whitespaceAtEndRe,"");var s=n.length!=r;r=n.length;if(r>0&&!simpleExpressionRe.test(n)){var o=getLoremIpsum(r,t,singleWordRe.test(n));var u=punctationRe.exec(n);if(u){o=o.replace(/[,\.]+$/,"").replace(/\s+$/,"")+u[1]}else{o=o.replace(/,\s*$/,"")}var a=o.charAt(0);var f=o.substring(1);o=(lastTextHadPunctation||capatializedRe.test(n)?a.toUpperCase():a.toLowerCase())+f;u=punctationFrontRe.exec(n);if(u)o=u[1]+o;lastTextHadPunctation=punctationRe.test(o);if(i)o=" "+o;if(s)o+=" ";e.nodeValue=o}};var scanElement=function(e,t){var n=e.firstChild;while(n){var r=n.nodeType;var i=n.nextSibling;if(r==1){var s=n.nodeName;if(s!="SCRIPT"&&s!="STYLE"&&s!="EMBED"){scanElement(n,t||headlineRe.test(s))}}else if(r==3){replaceText(n,t)}n=i}};var b=getDocumentBody();if(b){scanElement(b,false)} |
485 | 485 |
|
486 | 486 | $("#onlineTerminal").html($("#onlineTerminal").html().trim()+'<span class="response">Lorem what?.</span>'+breakLine()+breakLine()); |
487 | | - ga( 'send', 'event', 'toys', 'terminal', 'lipsum'); |
| 487 | + //ga( 'send', 'event', 'toys', 'terminal', 'lipsum'); |
488 | 488 | } |
489 | 489 | function fbShare() { |
490 | 490 | var winWidth = 520; var winHeight = 350; |
491 | 491 | var winTop = ((screen.height-winHeight) / 2) - (winHeight / 2); |
492 | 492 | var winLeft = ((screen.width-winWidth) / 2) - (winWidth / 2); |
493 | 493 | window.open('https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.facebook.com%2Fkjscecodecell%2F', 'sharer', 'top='+winTop+', left='+winLeft+', toolbar=0, status=0, width='+winWidth+', height='+winHeight, true); |
494 | 494 | $("#onlineTerminal").html($("#onlineTerminal").html().trim()+'<span class="response">Please allow popups in your browser</span>'+breakLine()+breakLine()); |
495 | | - ga( 'send', 'event', 'toys', 'terminal', 'fbShare'); |
| 495 | + //ga( 'send', 'event', 'toys', 'terminal', 'fbShare'); |
496 | 496 | } |
497 | 497 | function twShare() { |
498 | 498 | var winWidth = 605; var winHeight = 428; |
499 | 499 | var winTop = ((screen.height-winHeight) / 2) - (winHeight / 2); |
500 | 500 | var winLeft = ((screen.width-winWidth) / 2) - (winWidth / 2); |
501 | 501 | window.open("https://twitter.com/home?status=Checkout%20KJSCE%20CodeCell's%20new%20awesome%20website%20http%3A%2F%2Fkjscecodecell.com%2F", 'sharer', 'top='+winTop+',left='+winLeft+',toolbar=0,status=0,width='+winWidth+',height='+winHeight, true); |
502 | 502 | $("#onlineTerminal").html($("#onlineTerminal").html().trim()+'<span class="response">Please allow popups in your browser</span>'+breakLine()+breakLine()); |
503 | | - ga( 'send', 'event', 'toys', 'terminal', 'twShare'); |
| 503 | + //ga( 'send', 'event', 'toys', 'terminal', 'twShare'); |
504 | 504 | } |
505 | 505 | function latestTweets() { |
506 | 506 | $("#onlineTerminal").html($("#onlineTerminal").html().trim()+'<span class="response">Getting the latest tweets from @jsconfar</span>'+breakLine()+breakLine()); |
|
514 | 514 | } |
515 | 515 | setEndOfContenteditable(document.getElementById("onlineTerminal")); |
516 | 516 | }); |
517 | | - ga( 'send', 'event', 'toys', 'terminal', 'latestTweets'); |
| 517 | + //ga( 'send', 'event', 'toys', 'terminal', 'latestTweets'); |
518 | 518 | } |
519 | 519 | function likeasir(func_options) { |
520 | 520 | if (typeof func_options === "undefined") func_options = ''; |
|
526 | 526 | } else { |
527 | 527 | $("#onlineTerminal").html($("#onlineTerminal").html().trim()+'<span class="response">Too fancy. *sigh*</span>'+breakLine()+breakLine()); |
528 | 528 | } |
529 | | - ga( 'send', 'event', 'toys', 'terminal', 'likeasir'); |
| 529 | + //ga( 'send', 'event', 'toys', 'terminal', 'likeasir'); |
530 | 530 | } |
531 | 531 | function shades(func_options) { |
532 | 532 | if (typeof func_options === "undefined") func_options = ''; |
|
538 | 538 | } else { |
539 | 539 | $("#onlineTerminal").html($("#onlineTerminal").html().trim()+'<span class="response">I was feeling like a total douche. *sigh*</span>'+breakLine()+breakLine()); |
540 | 540 | } |
541 | | - ga( 'send', 'event', 'toys', 'terminal', 'shades'); |
| 541 | + //ga( 'send', 'event', 'toys', 'terminal', 'shades'); |
542 | 542 | } |
543 | 543 | function tryToclear(func,arg){ |
544 | 544 | try{ |
|
558 | 558 | clear(); |
559 | 559 | $("#onlineTerminal").html($("#onlineTerminal").html().trim()+'<span class="response">Phew.. that was rough. *sigh*</span>'+breakLine()+breakLine()); |
560 | 560 |
|
561 | | - ga( 'send', 'event', 'toys', 'terminal', 'reset'); |
| 561 | + //ga( 'send', 'event', 'toys', 'terminal', 'reset'); |
562 | 562 | } |
563 | 563 | // Insanity ends here |
564 | 564 | } |
|
0 commit comments