|
|
|
@ -38,7 +38,7 @@ require.config({
|
|
|
|
|
'raven-js': 'ext/raven-js/dist/raven', |
|
|
|
|
'es6-promise': 'ext/es6-promise/es6-promise', |
|
|
|
|
'lru-cache': 'ext/lru-cache/lib/lru-cache', |
|
|
|
|
'vs': "ext/monaco-editor/release/min/vs" |
|
|
|
|
'vs': "ext/monaco-editor/min/vs" |
|
|
|
|
}, |
|
|
|
|
shim: { |
|
|
|
|
underscore: {exports: '_'}, |
|
|
|
@ -60,7 +60,6 @@ define(function (require) {
|
|
|
|
|
var clipboard = require('clipboard'); |
|
|
|
|
var Hub = require('hub'); |
|
|
|
|
var Raven = require('raven-js'); |
|
|
|
|
var Alert = require('alert'); |
|
|
|
|
|
|
|
|
|
function start() { |
|
|
|
|
analytics.initialise(); |
|
|
|
@ -68,7 +67,6 @@ define(function (require) {
|
|
|
|
|
|
|
|
|
|
var options = require('options'); |
|
|
|
|
$('.language-name').text(options.language); |
|
|
|
|
var alert = new Alert(); |
|
|
|
|
|
|
|
|
|
var safeLang = options.language.toLowerCase().replace(/[^a-z_]+/g, ''); |
|
|
|
|
var defaultSrc = $('.template .lang.' + safeLang).text().trim(); |
|
|
|
@ -85,17 +83,7 @@ define(function (require) {
|
|
|
|
|
|
|
|
|
|
var config; |
|
|
|
|
if (!options.embedded) { |
|
|
|
|
var serializedState = window.location.hash.substr(1); |
|
|
|
|
if (serializedState) { |
|
|
|
|
try { |
|
|
|
|
config = url.deserialiseState(serializedState); |
|
|
|
|
} catch (exception) { |
|
|
|
|
alert.alert("Unable to parse URL", |
|
|
|
|
"<div>Compiler Explorer was unable to parse the URL hash. " + |
|
|
|
|
"Please check it and try again.</div>" + |
|
|
|
|
"<div class='url-parse-info'>" + exception + "</div>"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
config = url.deserialiseState(window.location.hash.substr(1)); |
|
|
|
|
if (config) { |
|
|
|
|
// replace anything in the default config with that from the hash
|
|
|
|
|
config = _.extend(defaultConfig, config); |
|
|
|
@ -164,11 +152,6 @@ define(function (require) {
|
|
|
|
|
window.localStorage.removeItem('gl'); |
|
|
|
|
window.location.reload(); |
|
|
|
|
}); |
|
|
|
|
$('#thanks-to').click(function () { |
|
|
|
|
$.get('thanks.html', function (result) { |
|
|
|
|
alert.alert("Special thanks to", $(result)); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$(start); |
|
|
|
|