mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-23 08:16:17 -04:00
Merge branch 'master' into v9
This commit is contained in:
commit
e4e32a9c56
22 changed files with 384 additions and 264 deletions
|
@ -256,7 +256,7 @@ class App {
|
|||
|
||||
for (let j = 0; j < catConf.ops.length; j++) {
|
||||
const opName = catConf.ops[j];
|
||||
if (!this.operations.hasOwnProperty(opName)) {
|
||||
if (!(opName in this.operations)) {
|
||||
log.warn(`${opName} could not be found.`);
|
||||
continue;
|
||||
}
|
||||
|
@ -372,7 +372,7 @@ class App {
|
|||
validFavourites(favourites) {
|
||||
const validFavs = [];
|
||||
for (let i = 0; i < favourites.length; i++) {
|
||||
if (this.operations.hasOwnProperty(favourites[i])) {
|
||||
if (favourites[i] in this.operations) {
|
||||
validFavs.push(favourites[i]);
|
||||
} else {
|
||||
this.alert(`The operation "${Utils.escapeHtml(favourites[i])}" is no longer available. ` +
|
||||
|
|
|
@ -321,7 +321,7 @@ class Manager {
|
|||
callback: callback.bind(scope || this)
|
||||
};
|
||||
|
||||
if (this.dynamicHandlers.hasOwnProperty(eventType)) {
|
||||
if (Object.prototype.hasOwnProperty.call(this.dynamicHandlers, eventType)) {
|
||||
// Listener already exists, add new handler to the appropriate list
|
||||
this.dynamicHandlers[eventType].push(eventConfig);
|
||||
} else {
|
||||
|
|
|
@ -81,7 +81,7 @@ class SeasonalWaiter {
|
|||
</div>`;
|
||||
optionsBody.appendChild(optionItem);
|
||||
|
||||
if (!this.app.options.hasOwnProperty("clippy")) {
|
||||
if (!("clippy" in this.app.options)) {
|
||||
this.app.options.clippy = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,11 +26,11 @@ self.handleMessage = function(e) {
|
|||
*/
|
||||
self.addEventListener("message", function(e) {
|
||||
const r = e.data;
|
||||
if (r.hasOwnProperty("file") && (r.hasOwnProperty("inputNum"))) {
|
||||
if (Object.prototype.hasOwnProperty.call(r, "file") && Object.prototype.hasOwnProperty.call(r, "inputNum")) {
|
||||
self.loadFile(r.file, r.inputNum);
|
||||
} else if (r.hasOwnProperty("file")) {
|
||||
} else if (Object.prototype.hasOwnProperty.call(r, "file")) {
|
||||
self.loadFile(r.file, "");
|
||||
} else if (r.hasOwnProperty("id")) {
|
||||
} else if (Object.prototype.hasOwnProperty.call(r, "id")) {
|
||||
self.id = r.id;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue