Copyright update, formatting changes
This commit is contained in:
parent
1a124be932
commit
c9bc4eef58
2
LICENSE
2
LICENSE
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2012-2014, Matt Godbolt
|
||||
Copyright (c) 2012-2015, Matt Godbolt
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
|
15
app.js
15
app.js
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
// Copyright (c) 2012-2014, Matt Godbolt
|
||||
// Copyright (c) 2012-2015, Matt Godbolt
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
|
@ -181,6 +181,7 @@ function compile(req, res) {
|
|||
child.on('exit', function (code) {
|
||||
clearTimeout(timeout);
|
||||
var maxSize = props.get("gcc-explorer", "max-asm-size", 8 * 1024 * 1024);
|
||||
|
||||
function complete(data) {
|
||||
var result = JSON.stringify({
|
||||
stdout: stdout,
|
||||
|
@ -215,7 +216,7 @@ function compile(req, res) {
|
|||
var data = filt_stdout;
|
||||
if (err) {
|
||||
if ("")
|
||||
data = '<No output: ' + err + '>';
|
||||
data = '<No output: ' + err + '>';
|
||||
}
|
||||
complete(data);
|
||||
});
|
||||
|
@ -328,11 +329,11 @@ function getCompilers(req, res) {
|
|||
|
||||
function getClientOptions(req, res) {
|
||||
var options = {
|
||||
google_analytics_account: props.get('gcc-explorer', 'clientGoogleAnalyticsAccount', 'UA-55180-6'),
|
||||
google_analytics_enabled: props.get('gcc-explorer', 'clientGoogleAnalyticsEnabled', true),
|
||||
sharing_enabled: props.get('gcc-explorer', 'clientSharingEnabled', true),
|
||||
github_ribbon_enabled: props.get('gcc-explorer', 'clientGitHubRibbonEnabled', true),
|
||||
urlshortener: props.get('gcc-explorer', 'clientURLShortener', 'google')
|
||||
google_analytics_account: props.get('gcc-explorer', 'clientGoogleAnalyticsAccount', 'UA-55180-6'),
|
||||
google_analytics_enabled: props.get('gcc-explorer', 'clientGoogleAnalyticsEnabled', true),
|
||||
sharing_enabled: props.get('gcc-explorer', 'clientSharingEnabled', true),
|
||||
github_ribbon_enabled: props.get('gcc-explorer', 'clientGitHubRibbonEnabled', true),
|
||||
urlshortener: props.get('gcc-explorer', 'clientURLShortener', 'google')
|
||||
};
|
||||
res.end("var OPTIONS = " + JSON.stringify(options) + ";");
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2012-2014, Matt Godbolt
|
||||
// Copyright (c) 2012-2015, Matt Godbolt
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2012-2014, Matt Godbolt
|
||||
// Copyright (c) 2012-2015, Matt Godbolt
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2012-2014, Matt Godbolt
|
||||
// Copyright (c) 2012-2015, Matt Godbolt
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2012-2014, Matt Godbolt
|
||||
// Copyright (c) 2012-2015, Matt Godbolt
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2012-2014, Matt Godbolt
|
||||
// Copyright (c) 2012-2015, Matt Godbolt
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2012-2014, Matt Godbolt
|
||||
// Copyright (c) 2012-2015, Matt Godbolt
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2012-2014, Matt Godbolt
|
||||
// Copyright (c) 2012-2015, Matt Godbolt
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2012-2014, Matt Godbolt
|
||||
// Copyright (c) 2012-2015, Matt Godbolt
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2012-2014, Matt Godbolt
|
||||
// Copyright (c) 2012-2015, Matt Godbolt
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
|
@ -133,9 +133,9 @@ function makePermalink() {
|
|||
$('#permalink').val('');
|
||||
|
||||
shortenURL(window.location.href.split('#')[0] + '#' + serialiseState(),
|
||||
function (shorturl) {
|
||||
$('#permalink').val(shorturl);
|
||||
})
|
||||
function (shorturl) {
|
||||
$('#permalink').val(shorturl);
|
||||
})
|
||||
}
|
||||
|
||||
function hidePermalink() {
|
||||
|
|
|
@ -14,28 +14,41 @@
|
|||
<script src="gcc.js"></script>
|
||||
<script src="ext/bootstrap/js/bootstrap.js"></script>
|
||||
<script src="ext/lz-string/lz-string-1.3.3-min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', OPTIONS.google_analytics_account]);
|
||||
_gaq.push(['_trackPageview']);
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', OPTIONS.google_analytics_account]);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
"use strict";
|
||||
function create_script_element (id, url) {
|
||||
var el = document.createElement('script'); el.type = 'text/javascript'; el.async = true; el.id = id;
|
||||
el.src = url;
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(el, s);
|
||||
}
|
||||
create_script_element('urlshortener', 'urlshorten-' + OPTIONS.urlshortener + ".js");
|
||||
if (OPTIONS.google_analytics_enabled)
|
||||
create_script_element('ga', ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js');
|
||||
if (OPTIONS.sharing_enabled) {
|
||||
create_script_element('gp', 'https://apis.google.com/js/plusone.js');
|
||||
create_script_element('twitter-wjs', '//platform.twitter.com/widgets.js');
|
||||
(function(document,script,id){var js,r=document.getElementsByTagName(script)[0],protocol=/^http:/.test(document.location)?'http':'https';if(!document.getElementById(id)){js=document.createElement(script);js.id=id;js.src=protocol+'://widgets.changetip.com/public/js/widgets.js';r.parentNode.insertBefore(js,r)}}(document,'script','changetip_w_0'));
|
||||
}
|
||||
})()
|
||||
</script>
|
||||
(function () {
|
||||
"use strict";
|
||||
function create_script_element(id, url) {
|
||||
var el = document.createElement('script');
|
||||
el.type = 'text/javascript';
|
||||
el.async = true;
|
||||
el.id = id;
|
||||
el.src = url;
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(el, s);
|
||||
}
|
||||
|
||||
create_script_element('urlshortener', 'urlshorten-' + OPTIONS.urlshortener + ".js");
|
||||
if (OPTIONS.google_analytics_enabled)
|
||||
create_script_element('ga', ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js');
|
||||
if (OPTIONS.sharing_enabled) {
|
||||
create_script_element('gp', 'https://apis.google.com/js/plusone.js');
|
||||
create_script_element('twitter-wjs', '//platform.twitter.com/widgets.js');
|
||||
(function (document, script, id) {
|
||||
var js, r = document.getElementsByTagName(script)[0], protocol = /^http:/.test(document.location) ? 'http' : 'https';
|
||||
if (!document.getElementById(id)) {
|
||||
js = document.createElement(script);
|
||||
js.id = id;
|
||||
js.src = protocol + '://widgets.changetip.com/public/js/widgets.js';
|
||||
r.parentNode.insertBefore(js, r)
|
||||
}
|
||||
}(document, 'script', 'changetip_w_0'));
|
||||
}
|
||||
})()
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-fixed-top">
|
||||
|
@ -135,24 +148,26 @@
|
|||
<map name="ghm">
|
||||
<area shape="poly" coords="16,0,149,133,149,0" href="https://github.com/mattgodbolt/gcc-explorer">
|
||||
</map>
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
if (!OPTIONS.sharing_enabled)
|
||||
$('#share').remove();
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
if (!OPTIONS.sharing_enabled)
|
||||
$('#share').remove();
|
||||
|
||||
if (OPTIONS.github_ribbon_enabled) {
|
||||
$(document.createElement('img'))
|
||||
.css({position: "absolute",
|
||||
top: "40px",
|
||||
right: 0,
|
||||
border: 0})
|
||||
.attr('src', 'https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png')
|
||||
.attr('alt', 'Fork me on GitHub')
|
||||
.attr('useMap', '#ghm')
|
||||
.appendTo(document.body)
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
if (OPTIONS.github_ribbon_enabled) {
|
||||
$(document.createElement('img'))
|
||||
.css({
|
||||
position: "absolute",
|
||||
top: "40px",
|
||||
right: 0,
|
||||
border: 0
|
||||
})
|
||||
.attr('src', 'https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png')
|
||||
.attr('alt', 'Fork me on GitHub')
|
||||
.attr('useMap', '#ghm')
|
||||
.appendTo(document.body)
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ function shortenURL(url, done) {
|
|||
if (!gapi.client) {
|
||||
// Load the Google APIs client library asynchronously, then the
|
||||
// urlshortener API, and finally come back here.
|
||||
$(document.body).append('<script src="https://apis.google.com/js/client.js?onload=googleJSClientLoaded">');
|
||||
$(document.body).append('<script src="https://apis.google.com/js/client.js?onload=googleJSClientLoaded">');
|
||||
return;
|
||||
}
|
||||
var request = gapi.client.urlshortener.url.insert({
|
||||
|
@ -15,6 +15,6 @@ function shortenURL(url, done) {
|
|||
}
|
||||
});
|
||||
request.execute(function (response) {
|
||||
done(response.id);
|
||||
done(response.id);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
// Copyright (c) 2012-2014, Matt Godbolt
|
||||
// Copyright (c) 2012-2015, Matt Godbolt
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
|
|
Loading…
Reference in New Issue