dev_cs
hjm 6 years ago
parent 69faee131d
commit 568f0e3e8a

@ -174,7 +174,7 @@ class TPIContextProvider extends Component {
} }
let testPath = '' let testPath = ''
if (window.location.port == 3007) { if (window.location.port == 3007) {
testPath = 'http://pre-newweb.educoder.net' testPath = 'http://test-newweb.educoder.net'
} }
// var url = `${testPath}/api/v1/games/${ game.identifier }/cost_time` // var url = `${testPath}/api/v1/games/${ game.identifier }/cost_time`
var url = `${testPath}/api/tasks/${ game.identifier }/cost_time` var url = `${testPath}/api/tasks/${ game.identifier }/cost_time`

@ -391,9 +391,16 @@ class MainContentContainer extends Component {
// var fileUpdatePromise = this.doFileUpdateRequest(true) // var fileUpdatePromise = this.doFileUpdateRequest(true)
// }); // });
// } // }
window.addEventListener("beforeunload", this.beforeunload);
} }
componentWillUnmount() { componentWillUnmount() {
// window.$(window).off( "unload" ) // window.$(window).off( "unload" )
window.removeEventListener("beforeunload", this.beforeunload);
}
beforeunload = () => {
this.doFileUpdateRequestOnCodeMirrorBlur()
} }

Loading…
Cancel
Save