manual fixes

This commit is contained in:
Thomas Grainger 2017-04-13 18:31:26 +01:00
parent b33f73ac9a
commit d05543db30
No known key found for this signature in database
GPG key ID: 995EA0A029283160
16 changed files with 57 additions and 37 deletions

View file

@ -179,8 +179,9 @@ App.prototype.populateOperationsList = function() {
document.body.appendChild(document.getElementById("edit-favourites"));
let html = "";
let i;
for (var i = 0; i < this.categories.length; i++) {
for (i = 0; i < this.categories.length; i++) {
let catConf = this.categories[i],
selected = i === 0,
cat = new HTMLCategory(catConf.name, selected);

View file

@ -201,7 +201,7 @@ OperationsWaiter.prototype.editFavouritesClick = function(e) {
editFavouritesList.innerHTML = html;
this.removeIntent = false;
var editableList = Sortable.create(editFavouritesList, {
const editableList = Sortable.create(editFavouritesList, {
filter: ".remove-icon",
onFilter: function (evt) {
const el = editableList.closest(evt.item);

View file

@ -30,7 +30,8 @@ OptionsWaiter.prototype.load = function(options) {
// Set options to match object
const cboxes = document.querySelectorAll("#options-body input[type=checkbox]");
for (var i = 0; i < cboxes.length; i++) {
let i;
for (i = 0; i < cboxes.length; i++) {
$(cboxes[i]).bootstrapSwitch("state", this.app.options[cboxes[i].getAttribute("option")]);
}

View file

@ -23,7 +23,7 @@ import OperationConfig from "../core/config/OperationConfig.js";
/**
* Main function used to build the CyberChef web app.
*/
var main = function() {
function main() {
const defaultFavourites = [
"To Base64",
"From Base64",
@ -51,7 +51,7 @@ var main = function() {
document.removeEventListener("DOMContentLoaded", main, false);
window.app = new App(Categories, OperationConfig, defaultFavourites, defaultOptions);
window.app.setup();
};
}
// Fix issues with browsers that don't support console.log()
window.console = console || {log: function() {}, error: function() {}};