猫史档案馆


【编程猫的彩蛋!?】真的假的?

用户:批小将批小将查看:11 回复:22 评论:11 创建时间:2018-08-29T11:40:40


无意间在社区随便查看网页源代码,是这样的,不信可以自己看看:

  <!DOCTYPE html> <html> <head> <meta charset=utf-8> <meta http-equiv=content-type content="text/html;charset=utf-8"> <meta http-equiv=X-UA-Compatible content="IE=edge"> <meta name=”renderer” content=”webkit”> <meta content="编程猫 最有趣 少儿编程 教育 可视化编程 scratch 小孩学编程 猫爪 儿童编程 做游戏 steam stem教育 未来教育 altschool 极客少年 猫老祖 零基础 免费学" name=keywords> <meta content="编程猫是培养未来创作者,是为2030年的世界准备的教育,适合7-15岁的孩子。在编程猫编程简单得像搭积木!编程猫以“寓教于乐”为理念,精心设计了在线儿童编程教育课程,在编程过程中培养孩子的逻辑思维和动手创造能力,并直接介入STEAM学科,让孩子从小就能够动手学科学知识,为未来做准备。 " name=description> <link rel="shortcut icon" href=https://static.codemao.cn/whitef/favicon.ico> <title>编程猫-培养未来创作者 - 官方网站 </title> <script src=https://static.codemao.cn/whitepaw/gt.js> </script> <script src="https://www.sobot.com/chat/frame/js/entrance.js?sysNum=25ad92ca4ed34ce396278a0c247b42e7" class=zhiCustomBtn id=zhichiScript data-args="manual=true&customBtn=true"> </script> <script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script',' https://ssl.google-analytics.com/analytics.js','ga'); ga('create', 'UA-74883869-1', 'auto'); ga('send', 'pageview'); </script> <script type=text/javascript>var _vds = _vds || []; window._vds = _vds; (function(){ _vds.push(['setAccountId', '96ff754c3d39a658']); (function() { var vds = document.createElement('script'); vds.type='text/javascript'; vds.async = true; vds.src = ' https://assets.growingio.com/vds.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(vds, s); })(); })(); </script> <link rel="shortcut icon" href=https://static.codemao.cn/community_frontend/favicon.ico> </head> <body ontouchstart=""> <img src=https://static.codemao.cn/pc/codemao_icon.png style=position:fixed;z-index:-1;opacity:0 alt=""> <div id=root> </div> <script type=text/javascript src=https://static.codemao.cn/whitepaw/tingyun-rum-www.js defer=defer> </script> <script src=https://static.codemao.cn/analytics/0.0.2/analytics.min.js async> </script> <script src=https://static.codemao.cn/whitef/detect-browser/platform.js defer=defer> </script> <script src="https://static.codemao.cn/whitef/detect-browser/index.js?v=20170509" defer=defer> </script> <script>(function(){ if(!window.console){window.console ={log:function(){}};return;} var me = 19; var Star = function(){ this.x=0; this.speed = 1; this.y=0; }; var score = 0; var strs = function(){ var result = ''; for(var i=0;i<20;i++){ result+="\n"; for(var n =0;n<40;n++){ var now = '--'; if(i==19&&n==me){ now='🐱'; }; stars.forEach(function(star){ var x= Math.floor(star.x); var y = Math.floor(star.y); if(x==n&&y==i){ if(Math.abs(star.y-19)<1&&(n==me)){ die(); } now='🚘'; }; }); result+=now; }; }; result+=" 《编程猫躲车车》得分:"+score; return result; }; window.onkeydown = function(e){ if(e.keyCode==37){ me-=1; if(me<0) me=0; }else if(e.keyCode==39){ me+=1; if(me>38) me=38; };};var count=0;var die = function(){ clearInterval(timer1); clearInterval(timer2); clearInterval(timer3); setTimeout(function(){ var shareUrl = ' https://www.codemao.cn'; var shareSummary = '我发现了编程猫的console小游戏《编程猫躲车车》,得了'+score + '分哦~'; var sharePic = ' https://static.codemao.cn/whitepaw/static/codemao-game.png'; console.log("游戏结束,您的得分:"+score+",分享到QQ空间:%o",' http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=' + shareUrl + '&showcount=1&desc=&summary=' + shareSummary + '&pics=' + sharePic + '&style=203&width=98&height=22'); },100);};var stars = [];var appearP = 1;var timer1,timer2,timer3;var begin = function(){ timer1 = setInterval(function(){ var createCount=Math.floor(Math.random()*5*appearP); for(var i=0;i<createCount;i++){ var star = new Star(); star.x = Math.floor(Math.random()*40); star.y = 0; star.speed = Math.random()*appearP; stars.push(star); }; },1000); timer2 = setInterval(function(){ stars.forEach(function(star,i){ star.y+=star.speed; if (star.y>=31){ stars.splice(i,1); score++; }; }); console.log(strs()); count++; if(count>300){ console.clear(); count = 0; } },100); timer3 = setInterval(function(){ appearP*=1.1; },3000);};console.log(` █████ \n ░░███ \n ██████ ██████ ███████ ██████ █████████████ ██████ ██████ \n ███░░███ ███░░███ ███░░███ ███░░███░░███░░███░░███ ░░░░░███ ███░░███\n░███ ░░░ ░███ ░███░███ ░███ ░███████ ░███ ░███ ░███ ███████ ░███ ░███\n░███ ███░███ ░███░███ ░███ ░███░░░ ░███ ░███ ░███ ███░░███ ░███ ░███\n░░██████ ░░██████ ░░████████░░██████ █████░███ █████░░████████░░██████ \n ░░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░ ░░░ ░░░░░ ░░░░░░░░ ░░░░░░ \n `);window.codemao = '恭喜少年,你找到了编程猫的第一颗彩蛋,输入 start(); \n后即可开始《编程猫躲车车》游戏!';window.start = function(){ appearP=1.1; starts=[]; score=0; me = 19; count = 0; console.log("%c请先用鼠标点击一下网页区域,游戏需要捕捉网页上的键盘事件(你应该懂吧)!","font-size:16px;color:#ff6700;"); console.log("使用键盘左右键移动最下方的小猫\"🐱\",躲开所有的汽车\"🚘\",汽车数量和速度会一直增加,看看谁坚持的最久吧!"); var countdown = 6; setTimeout(function(){ if(countdown--<=1){ begin(); }else{ console.log(countdown); setTimeout(arguments.callee,1000); } },1000); return ("倒计时!")}})(); </script> <script type=text/javascript src=https://static.codemao.cn/community_frontend/runtime.d5636c1535454971757.js?ad3ec5d87ad0f8a10f03> </script> <script type=text/javascript src=https://static.codemao.cn/community_frontend/index.339f701535454971757.js?ad3ec5d87ad0f8a10f03> </script> </body> </html>


回复

上一页1 页 / 共 1下一页
批小将批小将

如果看不仔细的看一下这段话:

恭喜少年,你找到了编程猫的第一颗彩蛋,输入 start(); \n后即可开始《编程猫躲车车》游戏!

点赞0


评论


520669已退猫520669已退猫

真的丫

点赞0


评论


呆萌回首呆萌回首

233

点赞0


评论


批小将批小将

大佬们知道怎么触发这个彩蛋吗

点赞0


评论


批小将批小将

实在不行官方加持

点赞0


评论


一一得一一一得一

真的,,,拿了91分……

 

触发规则就写了啊,在 console 输入 start() 再按回车就开始了~

 

center_image

点赞0


评论


一一得一一一得一

技术喵喵!emotion_编程猫_厉害了

点赞0


评论


黑猫琳娜黑猫琳娜

技术渣表示看不懂,只知道彩蛋“编程猫躲车车”(嘤嘤嘤)

点赞0


评论


官方雷电猴官方雷电猴

居然被你们发现彩蛋了

点赞0


评论


批小将批小将

ding ,让更多的人看到,出一份力,造福一群民,顶起来!

点赞0


评论


批小将批小将

ding ,让更多的人看到,出一份力,造福一群民,顶起来!

点赞0


评论


批小将批小将

尴尬发送到会挡监控

点赞0


评论


橙独秀橙独秀

第一颗?难道还有第二第三颗?

点赞0


评论


funny box工作室-素锦安年funny box工作室-素锦安年

作者在吗

 

点赞0


评论


funny box工作室-素锦安年funny box工作室-素锦安年

有事找你

点赞0


评论


funny box工作室-素锦安年funny box工作室-素锦安年

喵q2289884306

 

 

点赞0


评论


橙独秀橙独秀

666666

点赞0


评论


批小将批小将

按12检查,然后在console界面输入start()就可以进行游戏,不过我为什么报错了。。。。

点赞0


评论


呆萌回首呆萌回首

start();\n

点赞0


评论


黑猫琳娜黑猫琳娜

点赞0


评论


编程新生编程新生

emotion_编程猫_搓头

点赞0


评论


温柔的潘达熊294温柔的潘达熊294

恭喜 你知道得太多了

点赞0


评论