mirror of
https://github.com/gchq/CyberChef
synced 2025-12-15 07:43:22 +00:00
swap ENVIRONMENT_IS_* functions for Utils named exports
This commit is contained in:
@@ -8,6 +8,7 @@ import Operation from "../Operation";
|
||||
import OperationError from "../errors/OperationError";
|
||||
import { isImage } from "../lib/FileType";
|
||||
import { toBase64 } from "../lib/Base64.mjs";
|
||||
import { isWorkerEnvironment } from "../Utils";
|
||||
import jimp from "jimp";
|
||||
|
||||
/**
|
||||
@@ -57,7 +58,7 @@ class ImageOpacity extends Operation {
|
||||
throw new OperationError(`Error loading image. (${err})`);
|
||||
}
|
||||
try {
|
||||
if (ENVIRONMENT_IS_WORKER())
|
||||
if (isWorkerEnvironment())
|
||||
self.sendStatusMessage("Changing image opacity...");
|
||||
image.opacity(opacity / 100);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user