mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-27 06:23:41 -04:00
Merge branch 'master' of https://github.com/codecombat/codecombat
Conflicts: app/assets/main.html scripts/windows/coco-dev-setup/batch/config/finished_header.coco scripts/windows/coco-dev-setup/batch/config/github_header.coco scripts/windows/coco-dev-setup/batch/config/install_header.coco scripts/windows/coco-dev-setup/batch/config/npm_and_brunch_header.coco scripts/windows/coco-dev-setup/batch/config/readme.coco scripts/windows/coco-dev-setup/batch/localisation/de.coco scripts/windows/coco-dev-setup/batch/localisation/fr.coco scripts/windows/coco-dev-setup/batch/localisation/languages.coco scripts/windows/coco-dev-setup/batch/localisation/zh-HANS.coco scripts/windows/coco-dev-setup/batch/localisation/zh-HANT.coco scripts/windows/coco-dev-setup/batch/localisation/zh.coco scripts/windows/coco-dev-setup/batch/scripts/ask_question.bat scripts/windows/coco-dev-setup/batch/scripts/download_and_install_app.bat scripts/windows/coco-dev-setup/batch/scripts/download_and_install_applications.bat scripts/windows/coco-dev-setup/batch/scripts/get_array.bat scripts/windows/coco-dev-setup/batch/scripts/get_config.bat scripts/windows/coco-dev-setup/batch/scripts/get_download.bat scripts/windows/coco-dev-setup/batch/scripts/get_extension.bat scripts/windows/coco-dev-setup/batch/scripts/get_extension.ps1 scripts/windows/coco-dev-setup/batch/scripts/get_language.bat scripts/windows/coco-dev-setup/batch/scripts/get_local_text.bat scripts/windows/coco-dev-setup/batch/scripts/get_path_safe.bat scripts/windows/coco-dev-setup/batch/scripts/get_system_information.bat scripts/windows/coco-dev-setup/batch/scripts/get_text.bat scripts/windows/coco-dev-setup/batch/scripts/get_var.ps1 scripts/windows/coco-dev-setup/batch/scripts/get_variables.bat scripts/windows/coco-dev-setup/batch/scripts/get_variables.ps1 scripts/windows/coco-dev-setup/batch/scripts/github_setup.bat scripts/windows/coco-dev-setup/batch/scripts/npm_and_brunch_setup.bat scripts/windows/coco-dev-setup/batch/scripts/open_readme.bat scripts/windows/coco-dev-setup/batch/scripts/open_text_file.bat scripts/windows/coco-dev-setup/batch/scripts/print_dashed_seperator.bat scripts/windows/coco-dev-setup/batch/scripts/print_exit.bat scripts/windows/coco-dev-setup/batch/scripts/print_file.bat scripts/windows/coco-dev-setup/batch/scripts/print_finished_header.bat scripts/windows/coco-dev-setup/batch/scripts/print_github_header.bat scripts/windows/coco-dev-setup/batch/scripts/print_header.bat scripts/windows/coco-dev-setup/batch/scripts/print_info.bat scripts/windows/coco-dev-setup/batch/scripts/print_install_header.bat scripts/windows/coco-dev-setup/batch/scripts/print_license.bat scripts/windows/coco-dev-setup/batch/scripts/print_npm_and_brunch_header.bat scripts/windows/coco-dev-setup/batch/scripts/print_seperator.bat scripts/windows/coco-dev-setup/batch/scripts/print_tips.bat scripts/windows/coco-dev-setup/batch/scripts/run_script.bat scripts/windows/coco-dev-setup/batch/scripts/setup.bat scripts/windows/coco-dev-setup/batch/scripts/sign_license.bat scripts/windows/coco-dev-setup/batch/setup.bat
This commit is contained in:
commit
de9337820b
2 changed files with 176 additions and 13 deletions
app
171
app/assets/main.html
Normal file
171
app/assets/main.html
Normal file
|
@ -0,0 +1,171 @@
|
|||
<!doctype html>
|
||||
<!--[if lt IE 7]> <html class="lt-ie10 lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
|
||||
<!--[if IE 7]> <html class="lt-ie10 lt-ie9 lt-ie8" lang="en"> <![endif]-->
|
||||
<!--[if IE 8]> <html class="lt-ie10 lt-ie9" lang="en"> <![endif]-->
|
||||
<!--[if IE 9]> <html class="lt-ie10" lang="en"> <![endif]-->
|
||||
<!--[if !IE]><!--><html lang="en"> <!--<![endif]-->
|
||||
<head>
|
||||
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->
|
||||
<!--<script src="http://ie.microsoft.com/TestDrive/HTML5/CompatInspector/inspector.js"></script>--> <!-- for testing IE compatibility issues -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
<title>CodeCombat - Learn how to code by playing a game</title>
|
||||
<meta name="description" content="Learn programming with a multiplayer live coding strategy game. You're a wizard, and your spells are JavaScript. Free, open source HTML5 game!">
|
||||
|
||||
<meta property="og:title" content="CodeCombat: Multiplayer Programming">
|
||||
<meta property="og:url" content="http://codecombat.com">
|
||||
<meta property="og:type" content="game">
|
||||
<meta property="og:image" content="http://codecombat.com/images/pages/home/front_screenshot_01.png">
|
||||
<meta property="og:site_name" content="CodeCombat">
|
||||
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:title" content="CodeCombat: Multiplayer Programming">
|
||||
<meta name="twitter:url" content="http://codecombat.com">
|
||||
<meta name="twitter:site" content="CodeCombat">
|
||||
<meta name="twitter:image:src" content="http://codecombat.com/images/pages/base/logo_square_250.png">
|
||||
<meta name="twitter:description" content="Learn programming with a multiplayer live coding strategy game. You're a wizard, and your spells are JavaScript. Free, open source HTML5 game!">
|
||||
|
||||
|
||||
<link href="https://plus.google.com/115285980638641924488" rel="publisher" />
|
||||
|
||||
<link rel="shortcut icon" href="/images/favicon.ico">
|
||||
<link rel="stylesheet" href="/stylesheets/app.css">
|
||||
<script src="/lib/ace/ace.js"></script>
|
||||
<!--[if IE 9]> <script src="/javascripts/vendor_with_box2d.js"></script> <![endif]-->
|
||||
<!--[if !IE]><!--> <script src="/javascripts/vendor.js"></script> <!--<![endif]-->
|
||||
<script src="/javascripts/app.js"></script> <!-- it's all Backbone! -->
|
||||
|
||||
<script>
|
||||
window.userObject = "userObjectTag";
|
||||
</script>
|
||||
|
||||
<script>require('initialize');</script>
|
||||
|
||||
|
||||
<!-- begin segment.io code -->
|
||||
<script type="text/javascript">
|
||||
var analytics=analytics||[];(function(){var e=["identify","track","trackLink","trackForm","trackClick","trackSubmit","page","pageview","ab","alias","ready","group"],t=function(e){return function(){analytics.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var n=0;n<e.length;n++)analytics[e[n]]=t(e[n])})(),analytics.load=function(e){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=("https:"===document.location.protocol?"https://":"http://")+"d2dq2ahtl5zl1z.cloudfront.net/analytics.js/v1/"+e+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n)};
|
||||
analytics.load("jsjzx9n4d2");
|
||||
</script>
|
||||
<!-- end segment.io code -->
|
||||
|
||||
<!-- begin olark code -->
|
||||
<script data-cfasync="false" type='text/javascript'>/*<![CDATA[*/window.olark||(function(c){var f=window,d=document,l=f.location.protocol=="https:"?"https:":"http:",z=c.name,r="load";var nt=function(){
|
||||
f[z]=function(){
|
||||
(a.s=a.s||[]).push(arguments)};var a=f[z]._={
|
||||
},q=c.methods.length;while(q--){(function(n){f[z][n]=function(){
|
||||
f[z]("call",n,arguments)}})(c.methods[q])}a.l=c.loader;a.i=nt;a.p={
|
||||
0:+new Date};a.P=function(u){
|
||||
a.p[u]=new Date-a.p[0]};function s(){
|
||||
a.P(r);f[z](r)}f.addEventListener?f.addEventListener(r,s,false):f.attachEvent("on"+r,s);var ld=function(){function p(hd){
|
||||
hd="head";return["<",hd,"></",hd,"><",i,' onl' + 'oad="var d=',g,";d.getElementsByTagName('head')[0].",j,"(d.",h,"('script')).",k,"='",l,"//",a.l,"'",'"',"></",i,">"].join("")}var i="body",m=d[i];if(!m){
|
||||
return setTimeout(ld,100)}a.P(1);var j="appendChild",h="createElement",k="src",n=d[h]("div"),v=n[j](d[h](z)),b=d[h]("iframe"),g="document",e="domain",o;n.style.display="none";m.insertBefore(n,m.firstChild).id=z;b.frameBorder="0";b.id=z+"-loader";if(/MSIE[ ]+6/.test(navigator.userAgent)){
|
||||
b.src="javascript:false"}b.allowTransparency="true";v[j](b);try{
|
||||
b.contentWindow[g].open()}catch(w){
|
||||
c[e]=d[e];o="javascript:var d="+g+".open();d.domain='"+d.domain+"';";b[k]=o+"void(0);"}try{
|
||||
var t=b.contentWindow[g];t.write(p());t.close()}catch(x){
|
||||
b[k]=o+'d.write("'+p().replace(/"/g,String.fromCharCode(92)+'"')+'");d.close();'}a.P(2)};ld()};nt()})({
|
||||
loader: "static.olark.com/jsclient/loader0.js",name:"olark",methods:["configure","extend","declare","identify"]});
|
||||
/* custom configuration goes here (www.olark.com/documentation) */
|
||||
olark.identify('1451-787-10-5544');/*]]>*/</script>
|
||||
<!-- end olark code -->
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="fb-root"></div>
|
||||
|
||||
<!-- begin facebook code -->
|
||||
<script>
|
||||
// Additional JS functions here
|
||||
window.fbAsyncInit = function() {
|
||||
Backbone.Mediator.publish('fbapi-loaded');
|
||||
FB.init({
|
||||
appId : document.location.origin === 'http://localhost:3000' ? '607435142676437' : '148832601965463', // App ID
|
||||
channelUrl : document.location.origin +'/channel.html', // Channel File
|
||||
status : true, // check login status
|
||||
cookie : true, // enable cookies to allow the server to access the session
|
||||
xfbml : true // parse XFBML
|
||||
});
|
||||
|
||||
// This is fired for any auth related change, such as login, logout or session refresh.
|
||||
FB.Event.subscribe('auth.authResponseChange', function(response) {
|
||||
// Here we specify what we do with the response anytime this event occurs.
|
||||
if (response.status === 'connected') {
|
||||
// They have logged in to the app.
|
||||
Backbone.Mediator.publish('facebook-logged-in', {response:response});
|
||||
} else if (response.status === 'not_authorized') {
|
||||
// The person is logged into Facebook, but not into the app.
|
||||
} else {
|
||||
// The person is not logged into Facebook
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// Load the SDK asynchronously
|
||||
(function(d){
|
||||
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
|
||||
if (d.getElementById(id)) {return;}
|
||||
js = d.createElement('script'); js.id = id; js.async = true;
|
||||
js.src = "//connect.facebook.net/en_US/all.js";
|
||||
//js.src = "//connect.facebook.net/en_US/all/debug.js";
|
||||
ref.parentNode.insertBefore(js, ref);
|
||||
}(document));
|
||||
</script>
|
||||
<!-- end facebook code -->
|
||||
|
||||
|
||||
<header class="header-container" id="header-container"></header>
|
||||
|
||||
<div id="page-container"></div>
|
||||
<!--
|
||||
<div class="antiscroll-wrap">
|
||||
<div class="antiscroll-inner">
|
||||
<div id="page-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<div id="modal-wrapper"></div>
|
||||
|
||||
<!-- begin google api/plus code -->
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
|
||||
po.src = 'https://apis.google.com/js/client:plusone.js?onload=onGPlusLoaded';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
|
||||
})();
|
||||
|
||||
function onGPlusLoaded() {
|
||||
Backbone.Mediator.publish('gapi-loaded');
|
||||
}
|
||||
|
||||
function signinCallback(authResult) {
|
||||
if (authResult['access_token']) {
|
||||
Backbone.Mediator.publish('gplus-logged-in', authResult)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<!-- end google api/plus code -->
|
||||
|
||||
<!-- begin twitter code -->
|
||||
<script>
|
||||
(function (d,s,id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https';
|
||||
if(!d.getElementById(id)) {
|
||||
js = d.createElement(s);
|
||||
js.id = id;
|
||||
js.src = p + '://platform.twitter.com/widgets.js';
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}
|
||||
})(document, 'script', 'twitter-wjs');
|
||||
</script>
|
||||
<!-- end twitter code -->
|
||||
|
||||
<!-- begin filepicker.io code -->
|
||||
<script type="text/javascript">
|
||||
(function(a){if(window.filepicker){return}var b=a.createElement("script");b.type="text/javascript";b.async=!0;b.src=("https:"===a.location.protocol?"https:":"http:")+"//api.filepicker.io/v1/filepicker.js";var c=a.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c);var d={};d._queue=[];var e="pick,pickMultiple,pickAndStore,read,write,writeUrl,export,convert,store,storeUrl,remove,stat,setKey,constructWidget,makeDropPane".split(",");var f=function(a,b){return function(){b.push([a,arguments])}};for(var g=0;g<e.length;g++){d[e[g]]=f(e[g],d._queue)}window.filepicker=d})(document);
|
||||
</script>
|
||||
<!-- end filepicker.io code -->
|
||||
</body>
|
||||
</html>
|
|
@ -274,12 +274,10 @@ module.exports = class PlayLevelView extends View
|
|||
setTimeout(@preloadNextLevel, 3000)
|
||||
|
||||
showVictory: ->
|
||||
options = {level: @level, supermodel: @supermodel, session: @session}
|
||||
options = {level: @level, supermodel: @supermodel, session:@session}
|
||||
docs = new VictoryModal(options)
|
||||
@openModalView(docs)
|
||||
window.tracker?.trackEvent 'Saw Victory', level: @world.name, label: @world.name
|
||||
if me.get('anonymous')
|
||||
window.nextLevelURL = @getNextLevelID() # Signup will go here on completion instead of reloading.
|
||||
|
||||
onRestartLevel: ->
|
||||
@tome.reloadAllCode()
|
||||
|
@ -296,10 +294,11 @@ module.exports = class PlayLevelView extends View
|
|||
window.tracker?.trackEvent 'Saw Initial Infinite Loop', level: @world.name, label: @world.name
|
||||
|
||||
onPlayNextLevel: ->
|
||||
nextLevelID = @getNextLevelID()
|
||||
nextLevelURL = @getNextLevelURL()
|
||||
nextLevel = @getNextLevel()
|
||||
nextLevelID = nextLevel.get('slug') or nextLevel.id
|
||||
url = "/play/level/#{nextLevelID}"
|
||||
Backbone.Mediator.publish 'router:navigate', {
|
||||
route: nextLevelURL,
|
||||
route: url,
|
||||
viewClass: PlayLevelView,
|
||||
viewArgs: [{supermodel:@supermodel}, nextLevelID]}
|
||||
|
||||
|
@ -308,12 +307,6 @@ module.exports = class PlayLevelView extends View
|
|||
levels = @supermodel.getModels(Level)
|
||||
return l for l in levels when l.get('original') is nextLevelOriginal
|
||||
|
||||
getNextLevelID: ->
|
||||
nextLevel = @getNextLevel()
|
||||
nextLevelID = nextLevel.get('slug') or nextLevel.id
|
||||
|
||||
getNextLevelURL: -> "/play/level/#{@getNextLevelID()}"
|
||||
|
||||
onHighlightDom: (e) ->
|
||||
if e.delay
|
||||
delay = e.delay
|
||||
|
@ -478,6 +471,5 @@ module.exports = class PlayLevelView extends View
|
|||
clearInterval(@pointerInterval)
|
||||
@bus?.destroy()
|
||||
#@instance.save() unless @instance.loading
|
||||
delete window.nextLevelURL
|
||||
console.profileEnd?() if PROFILE_ME
|
||||
super()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue