Browse Source

Merge branch 'master' of github.com:mattgodbolt/compiler-explorer

dev/git-series/gccdum
Matt Godbolt 6 years ago
parent
commit
cb6247de78
  1. 6
      .idea/inspectionProfiles/profiles_settings.xml
  2. 3
      bower.json
  3. 2
      etc/config/c++.lud-mgodbolt01.properties
  4. 6
      etc/config/rust.amazon.properties
  5. 3
      static/asm-mode.js
  6. 18
      static/colour.js
  7. 154
      static/colours.css
  8. 4
      static/compiler.js
  9. 47
      static/editor.js
  10. 60
      static/explorer.css
  11. 76
      static/index.html
  12. 13
      static/loadSave.js
  13. 18
      static/main.js
  14. 132
      static/settings.js
  15. 1
      static/thanks.html

6
.idea/inspectionProfiles/profiles_settings.xml

@ -1,6 +0,0 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" />
<version value="1.0" />
</settings>
</component>

3
bower.json

@ -27,6 +27,7 @@
"clipboard": "^1.5.12",
"raven-js": "^3.10.0",
"es6-promise": "^4.0.5",
"lru-cache": "2.7.3"
"lru-cache": "2.7.3",
"seiyria-bootstrap-slider": "9.7.x"
}
}

2
etc/config/c++.lud-mgodbolt01.properties

@ -1,6 +1,6 @@
# Default settings for GCC Explorer.
defaultCompiler=g52
compilers=/usr/bin/g++:g44:g45:g46:clang35:g51:g52:gdef:msp430g453:cl:tcc
compilers=/usr/bin/g++:g44:g45:g46:clang35:g51:g52:gdef:msp430g453:cl:tcc:/usr/bin/arm-linux-gnueabi-g++
#compilers=&gcc:&clang:&windows
group.gcc.compilers=gdef:g62
compiler.gdef.exe=/usr/bin/g++

6
etc/config/rust.amazon.properties

@ -1,8 +1,10 @@
compilers=&rust
textBanner=Compilation provided by Compiler Explorer at https://rust.godbolt.org/
defaultCompiler=r1140
group.rust.compilers=r1140:r1130:r1120:r1110:r1100:r190:r180:r170:r160:r150:r140:r130:r120:r110:r100:nightly:beta
defaultCompiler=r1151
group.rust.compilers=r1151:r1140:r1130:r1120:r1110:r1100:r190:r180:r170:r160:r150:r140:r130:r120:r110:r100:nightly:beta
group.rust.compilerType=rust
compiler.r1140.exe=/opt/compiler-explorer/rust-1.15.1/bin/rustc
compiler.r1140.name=rustc 1.15.1
compiler.r1140.exe=/opt/compiler-explorer/rust-1.14.0/bin/rustc
compiler.r1140.name=rustc 1.14.0
compiler.r1130.exe=/opt/compiler-explorer/rust-1.13.0/bin/rustc

3
static/asm-mode.js

@ -112,7 +112,8 @@ define(function (require) {
[/[ \t\r\n]+/, 'white'],
[/\/\*/, 'comment', '@comment'],
[/\/\/.*$/, 'comment'],
[/#.*$/, 'comment']
[/#.*$/, 'comment'],
[/@.*$/, 'comment']
]
}
};

18
static/colour.js

@ -29,16 +29,25 @@ define(function (require) {
var _ = require('underscore');
var monaco = require('monaco');
var NumRainbowColours = 12;
var schemes = [
{name: 'rainbow', desc: 'Rainbow 1', count: 12},
{name: 'rainbow2', desc: 'Rainbow 2', count: 12},
{name: 'earth', desc: 'Earth tones (colourblind safe)', count: 9},
{name: 'green-blue', desc: 'Greens and blues (colourblind safe)', count: 4}
];
function applyColours(editor, colours, prevDecorations) {
function applyColours(editor, colours, schemeName, prevDecorations) {
var scheme = _.findWhere(schemes, {name: schemeName});
if (!scheme) {
scheme = schemes[0];
}
var newDecorations = _.map(colours, function (ordinal, line) {
line = parseInt(line) + 1;
return {
range: new monaco.Range(line, 1, line, 1),
options: {
isWholeLine: true,
className: "rainbow-" + (ordinal % NumRainbowColours)
className: scheme.name + "-" + (ordinal % scheme.count)
}
};
});
@ -46,6 +55,7 @@ define(function (require) {
}
return {
applyColours: applyColours
applyColours: applyColours,
schemes: schemes
};
});

154
static/colours.css

@ -0,0 +1,154 @@
/* These colours from Cynthia Brewer's excellent page at
* http://colorbrewer2.org/
*/
/* rainbow is 12 Set3 */
.rainbow-0 {
background: rgba(141, 211, 199, 0.35) !important;
}
.rainbow-1 {
background: rgba(255, 255, 179, 0.35) !important;
}
.rainbow-2 {
background: rgba(190, 186, 218, 0.35) !important;
}
.rainbow-3 {
background: rgba(251, 128, 114, 0.35) !important;
}
.rainbow-4 {
background: rgba(128, 177, 211, 0.35) !important;
}
.rainbow-5 {
background: rgba(253, 180, 98, 0.35) !important;
}
.rainbow-6 {
background: rgba(179, 222, 105, 0.35) !important;
}
.rainbow-7 {
background: rgba(252, 205, 229, 0.35) !important;
}
.rainbow-8 {
background: rgba(217, 217, 217, 0.35) !important;
}
.rainbow-9 {
background: rgba(188, 128, 189, 0.35) !important;
}
.rainbow-10 {
background: rgba(204, 234, 197, 0.35) !important;
}
.rainbow-11 {
background: rgba(255, 237, 111, 0.35) !important;
}
/* rainbow2 is 12 Paired */
.rainbow2-0 {
background: rgba(166, 206, 227, 0.35) !important;
}
.rainbow2-1 {
background: rgba(31, 120, 180, 0.35) !important;
}
.rainbow2-2 {
background: rgba(178, 223, 138, 0.35) !important;
}
.rainbow2-3 {
background: rgba(51, 160, 44, 0.35) !important;
}
.rainbow2-4 {
background: rgba(251, 154, 153, 0.35) !important;
}
.rainbow2-5 {
background: rgba(227, 26, 28, 0.35) !important;
}
.rainbow2-6 {
background: rgba(253, 191, 111, 0.35) !important;
}
.rainbow2-7 {
background: rgba(255, 127, 0, 0.35) !important;
}
.rainbow2-8 {
background: rgba(202, 178, 214, 0.35) !important;
}
.rainbow2-9 {
background: rgba(106, 61, 154, 0.35) !important;
}
.rainbow2-10 {
background: rgba(255, 255, 153, 0.35) !important;
}
.rainbow2-11 {
background: rgba(177, 89, 40, 0.35) !important;
}
/* earth is 'BrBG' */
.earth-0 {
background: rgba(140, 81, 10, 0.35) !important;
}
.earth-1 {
background: rgba(191, 129, 45, 0.35) !important;
}
.earth-2 {
background: rgba(223, 194, 125, 0.35) !important;
}
.earth-3 {
background: rgba(246, 232, 195, 0.35) !important;
}
.earth-4 {
background: rgba(245, 245, 245, 0.35) !important;
}
.earth-5 {
background: rgba(199, 234, 229, 0.35) !important;
}
.earth-6 {
background: rgba(128, 205, 193, 0.35) !important;
}
.earth-7 {
background: rgba(53, 151, 143, 0.35) !important;
}
.earth-8 {
background: rgba(1, 102, 94, 0.35) !important;
}
/* Greens and blues is Paired */
.green-blue-0 {
background: rgba(166, 206, 227, 0.35) !important;
}
.green-blue-1 {
background: rgba(31, 120, 180, 0.35) !important;
}
.green-blue-2 {
background: rgba(178, 223, 138, 0.35) !important;
}
.green-blue-3 {
background: rgba(51, 160, 44, 0.35) !important;
}

4
static/compiler.js

@ -454,13 +454,13 @@ define(function (require) {
this.eventHub.emit('compilerFontScale', this.id, this.fontScale.scale);
};
Compiler.prototype.onColours = function (editor, colours) {
Compiler.prototype.onColours = function (editor, colours, scheme) {
if (editor == this.sourceEditorId) {
var asmColours = {};
_.each(this.assembly, function (x, index) {
if (x.source) asmColours[index] = colours[x.source - 1];
});
this.colours = colour.applyColours(this.outputEditor, asmColours, this.colours);
this.colours = colour.applyColours(this.outputEditor, asmColours, scheme, this.colours);
}
};

47
static/editor.js

@ -28,7 +28,6 @@ define(function (require) {
var _ = require('underscore');
var $ = require('jquery');
var colour = require('colour');
var Toggles = require('toggles');
var loadSaveLib = require('loadSave');
var FontScale = require('fontscale');
var Sharing = require('sharing');
@ -46,13 +45,12 @@ define(function (require) {
this.domRoot = container.getElement();
this.domRoot.html($('#codeEditor').html());
this.eventHub = hub.createEventHub();
this.settings = {};
this.widgetsByCompiler = {};
this.asmByCompiler = {};
this.busyCompilers = {};
this.colours = [];
this.options = new Toggles(this.domRoot.find('.options'), state.options);
this.options.on('change', _.bind(this.onOptionsChange, this));
var cmMode;
switch (lang.toLowerCase()) {
@ -98,10 +96,7 @@ define(function (require) {
// * Only actually triggering a change if the document text has changed from
// the previous emitted.
this.lastChangeEmitted = null;
var ChangeDebounceMs = 800;
this.debouncedEmitChange = _.debounce(function () {
if (self.options.get().compileOnChange) self.maybeEmitChange();
}, ChangeDebounceMs);
this.onSettingsChange({});
this.editor.getModel().onDidChangeContent(_.bind(function () {
this.debouncedEmitChange();
this.updateState();
@ -148,6 +143,8 @@ define(function (require) {
this.eventHub.on('compileResult', this.onCompileResponse, this);
this.eventHub.on('selectLine', this.onSelectLine, this);
this.eventHub.on('settingsChange', this.onSettingsChange, this);
// NB a new compilerConfig needs to be created every time; else the state is shared
// between all compilers created this way. That leads to some nasty-to-find state
// bugs e.g. https://github.com/mattgodbolt/compiler-explorer/issues/225
@ -187,8 +184,7 @@ define(function (require) {
Editor.prototype.updateState = function () {
var state = {
id: this.id,
source: this.getSource(),
options: this.options.get()
source: this.getSource()
};
this.fontScale.addState(state);
this.container.setState(state);
@ -198,20 +194,29 @@ define(function (require) {
return this.editor.getModel().getValue();
};
Editor.prototype.onOptionsChange = function (before, after) {
this.updateState();
Editor.prototype.onSettingsChange = function (newSettings) {
var before = this.settings;
var after = newSettings;
this.settings = _.clone(newSettings);
this.editor.updateOptions({autoClosingBrackets : this.settings.autoCloseBrackets});
// TODO: bug when:
// * Turn off auto.
// * edit code
// * change compiler or compiler options (out of date code is used)
if (after.compileOnChange && !before.compileOnChange) {
// If we've just enabled "compile on change"; forcibly send a change
// which will recolourise as required.
this.maybeEmitChange(true);
} else if (before.colouriseAsm !== after.colouriseAsm) {
// if the colourise option has been toggled...recompute colours
this.numberUsedLines();
if (before.delayAfterChange !== after.delayAfterChange || !this.debouncedEmitChange) {
if (after.delayAfterChange) {
this.debouncedEmitChange = _.debounce(_.bind(function () {
this.maybeEmitChange();
}, this), after.delayAfterChange);
this.maybeEmitChange(true);
} else {
this.debouncedEmitChange = _.noop;
}
}
this.numberUsedLines();
};
Editor.prototype.numberUsedLines = function () {
@ -229,12 +234,12 @@ define(function (require) {
});
if (_.any(this.busyCompilers)) return;
this.updateColours(this.options.get().colouriseAsm ? result : []);
this.updateColours(this.settings.colouriseAsm ? result : []);
};
Editor.prototype.updateColours = function (colours) {
this.colours = colour.applyColours(this.editor, colours, this.colours);
this.eventHub.emit('colours', this.id, colours);
this.colours = colour.applyColours(this.editor, colours, this.settings.colourScheme, this.colours);
this.eventHub.emit('colours', this.id, colours, this.settings.colourScheme);
};
Editor.prototype.onCompilerClose = function (compilerId) {

60
static/explorer.css

@ -2,12 +2,21 @@
@import url("ext/golden-layout/src/css/goldenlayout-base.css");
@import url("ext/golden-layout/src/css/goldenlayout-light-theme.css");
@import url("ext/selectize/dist/css/selectize.bootstrap2.css");
@import url("ext/seiyria-bootstrap-slider/dist/css/bootstrap-slider.css");
@import url("colours.css");
/* TEMP HACK: https://github.com/Microsoft/monaco-editor/issues/349 */
.quick-open-tree .row { margin-left: 0; }
.navbar {
border-radius: 0;
margin-bottom: 2px;
}
.navbar-brand {
width: 13.5em;
}
.navbar-inverse {
background-color: #226;
}
@ -66,57 +75,6 @@ input.options {
background-color: #5bc0de !important;
}
/* These colours from Cynthia Brewer's excellent page at
* http://colorbrewer2.org/
*/
.rainbow-0 {
background: rgba(141, 211, 199, 0.35) !important;
}
.rainbow-1 {
background: rgba(255, 255, 179, 0.35) !important;
}
.rainbow-2 {
background: rgba(190, 186, 218, 0.35) !important;
}
.rainbow-3 {
background: rgba(251, 128, 114, 0.35) !important;
}
.rainbow-4 {
background: rgba(128, 177, 211, 0.35) !important;
}
.rainbow-5 {
background: rgba(253, 180, 98, 0.35) !important;
}
.rainbow-6 {
background: rgba(179, 222, 105, 0.35) !important;
}
.rainbow-7 {
background: rgba(252, 205, 229, 0.35) !important;
}
.rainbow-8 {
background: rgba(217, 217, 217, 0.35) !important;
}
.rainbow-9 {
background: rgba(188, 128, 189, 0.35) !important;
}
.rainbow-10 {
background: rgba(204, 234, 197, 0.35) !important;
}
.rainbow-11 {
background: rgba(255, 237, 111, 0.35) !important;
}
.address {
width: 5em;
font-size: smaller;

76
static/index.html

@ -20,9 +20,13 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Compiler Explorer &dash; <span class="language-name"></span></a>
<a class="navbar-brand" href="#" title="Compiler Explorer">Compiler Explorer &dash; <span
class="language-name"></span></a>
</div>
<li class="navbar-collapse collapse" id="navbar-collapse">
<ul class="nav navbar-nav navbar-left">
<li><a href="#" data-target="#settings" data-toggle="modal">Settings</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://www.patreon.com/mattgodbolt">
<img height="20" width="20" src="assets/patreon_logo.png">&nbsp;
@ -66,16 +70,6 @@
<div class="gl_keep template">
<div id="codeEditor">
<div class="top-bar btn-toolbar" role="toolbar">
<div class="btn-group btn-group-sm options" role="group">
<button title="Colourise lines so one can see how the source maps to the output"
class="btn btn-default btn-sm active" data-bind="colouriseAsm">
<span class="glyphicon glyphicon-adjust"></span>
</button>
<button title="Run the compilers automatically as you type"
class="btn btn-default btn-sm active" data-bind="compileOnChange">
<span class="glyphicon glyphicon-play-circle"></span>
</button>
</div>
<div class="btn-group btn-group-sm">
<button title="Decrease font size"
class="btn btn-default btn-sm decrease-font-size">
@ -91,9 +85,8 @@
</button>
</div>
<div class="btn-group btn-group-sm">
<button title="Load text from an example"
class="btn btn-default btn-sm load-save">
<span class="glyphicon glyphicon-floppy-save"></span>
<button title="Load or save text" class="btn btn-default btn-sm load-save">
<span class="glyphicon glyphicon-floppy-disk"></span>
</button>
<button title="Get URLs for sharing"
class="btn btn-default btn-sm share">
@ -265,13 +258,20 @@ int square(int num) {
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Load and save editor text</h4>
<h3 class="modal-title">Load and save editor text</h3>
</div>
<div class="modal-body">
<h5>Load from examples:</h5>
<ul class="examples">
<li class="template example"><a href="#"></a></li>
</ul>
<div class="form-group">
<h4>Load from examples:</h4>
<ul class="examples">
<li class="template example"><a href="#"></a></li>
</ul>
</div>
<div class="form-group">
<label class="btn btn-default btn-file">Load from a local file
<input style="display:none" type="file" class="local-file"
accept=".cpp,.cxx,.c,.h,.hpp,.hxx"></label>
</div>
</div>
<!-- model-body -->
<div class="modal-footer">
@ -288,7 +288,7 @@ int square(int num) {
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">Something alert worthy</h4>
<h3 class="modal-title">Something alert worthy</h3>
</div>
<div class="modal-body">
</div>
@ -302,5 +302,41 @@ int square(int num) {
<!-- /.modal-dialog -->
</div>
<div class="modal fade gl_keep" id="settings">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3 class="modal-title">Compiler Explorer Settings</h3>
</div>
<div class="modal-body">
<div>These settings control how Compiler Explorer acts for you. They are not preserved as part of shared
URLs, and are persisted locally using browser local storage.
</div>
<h4>Editor</h4>
<div class="form-group" role="group">
<div class="form-control checkbox"><label><input type="checkbox" class="autoCloseBrackets">
Automatically insert matching brackets and parentheses</label></div>
<div class="form-control">Delay before compiling:&nbsp;<b>Disabled</b>
<div class="slider slider-horizontal delay"></div>
<b>3s</b></div>
</div>
<h4>Compilation</h4>
<div class="form-group" role="group">
<div class="form-control checkbox"><label><input type="checkbox" class="colourise">Colourise lines
so one can see how the source maps to the output</label></div>
<div class="form-control"><label>Colour scheme: <select class="colourScheme"></select></label></div>
</div>
</div>
<!-- model-body -->
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
</body>
</html>

13
static/loadSave.js

@ -32,6 +32,8 @@ define(function (require) {
this.modal = $('#load-save');
this.onLoad = _.identity;
this.modal.find('.local-file').change(_.bind(this.onLocalFile, this));
$.getJSON('/source/builtin/list', _.bind(function (list) {
this.modal.find('.example:visible').remove();
var examples = this.modal.find('.examples');
@ -50,6 +52,17 @@ define(function (require) {
}, this));
}
LoadSave.prototype.onLocalFile = function (event) {
var files = event.target.files;
var file = files[0];
var reader = new FileReader();
reader.onload = _.bind(function () {
this.onLoad(reader.result);
}, this);
reader.readAsText(file);
this.modal.modal('hide');
};
LoadSave.prototype.run = function (onLoad) {
this.onLoad = onLoad;
this.modal.modal();

18
static/main.js

@ -38,18 +38,21 @@ 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/min/vs"
'vs': "ext/monaco-editor/min/vs",
'bootstrap-slider': 'ext/seiyria-bootstrap-slider/dist/bootstrap-slider'
},
shim: {
underscore: {exports: '_'},
'lru-cache': {exports: 'LRUCache'},
bootstrap: ['jquery']
bootstrap: ['jquery'],
'bootstrap-slider': ['bootstrap']
}
});
define(function (require) {
"use strict";
require('bootstrap');
require('bootstrap-slider');
var analytics = require('analytics');
var sharing = require('sharing');
var _ = require('underscore');
@ -60,6 +63,7 @@ define(function (require) {
var clipboard = require('clipboard');
var Hub = require('hub');
var Raven = require('raven-js');
var settings = require('./settings');
function start() {
analytics.initialise();
@ -147,6 +151,16 @@ define(function (require) {
new clipboard('.btn.clippy');
settings($('#settings'), function () {
return JSON.parse(window.localStorage.getItem('settings'));
}(), function (settings) {
try {
window.localStorage.setItem('settings', JSON.stringify(settings));
} catch (e) {
}
layout.eventHub.emit('settingsChange', settings);
});
sharing.initShareButton($('#share'), layout);
$('#ui-reset').click(function () {
window.localStorage.removeItem('gl');

132
static/settings.js

@ -0,0 +1,132 @@
// Copyright (c) 2012-2017, Matt Godbolt
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
define(function (require) {
var _ = require('underscore');
var colour = require('./colour');
function Setting(elem, name, Control, param) {
this.elem = elem;
this.name = name;
this.control = new Control(elem, param);
}
Setting.prototype.getUi = function () {
return this.control.getUi(this.elem);
};
Setting.prototype.putUi = function (value) {
this.control.putUi(this.elem, value);
};
function Checkbox() {
}
Checkbox.prototype.getUi = function (elem) {
return !!elem.prop('checked');
};
Checkbox.prototype.putUi = function (elem, value) {
elem.prop('checked', !!value);
};
function Select(elem, populate) {
elem.empty();
_.each(populate, function (e) {
elem.append($('<option value="' + e.label + '">' + e.desc + "</option>"));
});
}
Select.prototype.getUi = function (elem) {
return elem.val();
};
Select.prototype.putUi = function (elem, value) {
elem.val(value);
};
function Slider(elem, sliderSettings) {
elem.slider(sliderSettings);
}
Slider.prototype.getUi = function (elem) {
return elem.slider('getValue');
};
Slider.prototype.putUi = function (elem, value) {
elem.slider('setValue', value);
};
// TODO: editor options like auto paren
// TODO: color choices for colourisation
function setupSettings(root, settings, onChange) {
settings = settings || {};
if (settings.delayAfterChange === undefined)
settings.delayAfterChange = 750;
if (settings.colouriseAsm === undefined)
settings.colouriseAsm = true;
var settingsObjs = [];
function onUiChange() {
var settings = {};
_.each(settingsObjs, function (s) {
settings[s.name] = s.getUi();
});
onChange(settings);
}
function onSettingsChange(settings) {
_.each(settingsObjs, function (s) {
s.putUi(settings[s.name]);
});
}
function add(elem, key, defaultValue, Type, param) {
if (settings[key] === undefined)
settings[key] = defaultValue;
settingsObjs.push(new Setting(elem, key, Type, param));
elem.change(onUiChange);
}
add(root.find('.colourise'), 'colouriseAsm', true, Checkbox);
add(root.find('.autoCloseBrackets'), 'autoCloseBrackets', true, Checkbox);
add(root.find('.colourScheme'), 'colourScheme', colour.schemes[0].name, Select,
_.map(colour.schemes, function (scheme) {
return {label: scheme.name, desc: scheme.desc};
}));
add(root.find('.slider'), 'delayAfterChange', 750, Slider, {
max: 3000,
step: 250,
formatter: function (x) {
if (x === 0) return "Disabled";
return (x / 1000.0).toFixed(2) + "s";
}
});
onSettingsChange(settings);
onChange(settings);
}
return setupSettings;
})
;

1
static/thanks.html

@ -6,6 +6,7 @@
<li>Alexander Guettler</li>
<li>Alejandro Lucena</li>
<li>xyz</li>
<li>ileonte</li>
<li>Matt Weber</li>
<li>Simon Haegler</li>
<li>Jon Kalb</li>

Loading…
Cancel
Save