chore: lint JS file

This commit is contained in:
Ben Goldsworthy 2021-04-15 03:10:54 +01:00
parent a06162d741
commit d8bb767806

View file

@ -18,7 +18,7 @@
ed.addButton('footnotes', { ed.addButton('footnotes', {
title: 'footnotes', title: 'footnotes',
cmd: 'footnotes', cmd: 'footnotes',
image : url + '/../img/fn-wysiwyg.png' image: url + '/../img/fn-wysiwyg.png',
}); });
ed.addCommand('footnotes', function () { ed.addCommand('footnotes', function () {
@ -26,16 +26,16 @@
type: 'POST', type: 'POST',
url: './admin-ajax.php', url: './admin-ajax.php',
data: { data: {
action: 'footnotes_getTags' action: 'footnotes_getTags',
}, },
success: function (data, textStatus, XMLHttpRequest) { success: function (data, textStatus, XMLHttpRequest) {
var l_arr_Tags = JSON.parse(data); var tags = JSON.parse(data);
var return_text = l_arr_Tags['start'] + ed.selection.getContent() + l_arr_Tags['end']; var returnText = tags.start + ed.selection.getContent() + tags.end;
ed.execCommand('insertHTML', true, return_text); ed.execCommand('insertHTML', true, returnText);
}, },
error: function (MLHttpRequest, textStatus, errorThrown) { error: function (MLHttpRequest, textStatus, errorThrown) {
console.log("Error: " + errorThrown); console.log('Error: ' + errorThrown);
} },
}); });
}); });
}, },
@ -68,9 +68,9 @@
author: 'Mark Cheret', author: 'Mark Cheret',
authorurl: 'https://cheret.org/footnotes/', authorurl: 'https://cheret.org/footnotes/',
infourl: 'https://wordpress.org/plugins/footnotes/', infourl: 'https://wordpress.org/plugins/footnotes/',
version : '2.6.5' version: '2.6.5',
}; };
} },
}); });
// Register plugin // Register plugin