Cleanup formatting in embedded html

This commit is contained in:
Daniel Perna 2018-01-24 23:29:53 +01:00
parent 663fe8d28a
commit 7141cb799e

View file

@ -2082,7 +2082,6 @@ INDEX = Template(r"""<!DOCTYPE html>
<script type="text/javascript"> <script type="text/javascript">
document.addEventListener("DOMContentLoaded", function(){ document.addEventListener("DOMContentLoaded", function(){
$('.preloader-background').delay(800).fadeOut('slow'); $('.preloader-background').delay(800).fadeOut('slow');
$('.preloader-wrapper') $('.preloader-wrapper')
.delay(800) .delay(800)
.fadeOut('slow'); .fadeOut('slow');
@ -3028,8 +3027,7 @@ var lint_timeout;
var lint_status = $('#lint-status'); // speed optimization var lint_status = $('#lint-status'); // speed optimization
var lint_error = ""; var lint_error = "";
function check_lint() function check_lint() {
{
if (document.getElementById('currentfile').value.match(".yaml$")) { if (document.getElementById('currentfile').value.match(".yaml$")) {
try { try {
var text = editor.getValue().replace(/!(include|secret)/g,".$1"); // hack because js-yaml does not like !include/!secret var text = editor.getValue().replace(/!(include|secret)/g,".$1"); // hack because js-yaml does not like !include/!secret
@ -3049,8 +3047,7 @@ function check_lint()
} }
} }
function queue_lint(e) function queue_lint(e) {
{
if (document.getElementById('currentfile').value.match(".yaml$")) { if (document.getElementById('currentfile').value.match(".yaml$")) {
clearTimeout(lint_timeout); clearTimeout(lint_timeout);
lint_timeout = setTimeout(check_lint, 500); lint_timeout = setTimeout(check_lint, 500);
@ -3064,8 +3061,7 @@ function queue_lint(e)
} }
} }
function show_lint_error() function show_lint_error() {
{
if(lint_error) { if(lint_error) {
$("#modal_lint textarea").val(lint_error); $("#modal_lint textarea").val(lint_error);
$("#modal_lint").modal('open'); $("#modal_lint").modal('open');