async function generateImageForOnline() {
    // Verilog Mode -> Different logic
    // Fix aspect ratio to 1.6
    // Ensure image is approximately 700 x 440
    var ratio = 1.6
    if(verilogModeGet()) {
        var node = document.getElementsByClassName('CodeMirror')[0];
        // var node = document.getElementsByClassName('CodeMirror')[0];
        var prevHeight = $(node).css('height');
        var prevWidth = $(node).css('width');
        var baseWidth = 500;
        var baseHeight = Math.round(baseWidth / ratio);
        $(node).css('height', baseHeight);
        $(node).css('width', baseWidth);

        var data = await domtoimage.toJpeg(node);
        $(node).css('width', prevWidth);
        $(node).css('height', prevHeight);
        data = await crop(data, baseWidth, baseHeight);
        return data;
    }

    simulationArea.lastSelected = undefined; // Unselect any selections

    // Fix aspect ratio to 1.6
    if (width > height * ratio) {
        height = width / ratio;
    } else {
        width = height * 1.6;
    }

    // Center circuits
    globalScope.centerFocus();

    // Ensure image is approximately 700 x 440
    const resolution = Math.min(700 / (simulationArea.maxWidth - simulationArea.minWidth), 440 / (simulationArea.maxHeight - simulationArea.minHeight));

    data = generateImage('jpeg', 'current', false, resolution, false);

    // Restores Focus
    globalScope.centerFocus(false);
    return data;

}
Function that is used to save image for display in the website
@return {JSON}
@category data