<commit_before>function resize(w, h) {
    JFCustomWidget.requestFrameResize({
        width: w,
        height: h
    });
}

JFCustomWidget.subscribe('ready', function(){
    var file = null;

    JFCustomWidget.subscribe("submit", function(){
        var msg = {
            valid: !!file,
            value: file
        };
        JFCustomWidget.sendSubmit(msg);
    });

    UPLOADCARE_PUBLIC_KEY = JFCustomWidget.getWidgetSetting('publicKey');
    UPLOADCARE_LOCALE = JFCustomWidget.getWidgetSetting('locale') || 'en';
    UPLOADCARE_IMAGES_ONLY = (JFCustomWidget.getWidgetSetting('imagesOnly') == 'Yes');

    var s = document.createElement('script');
    s.type = 'text/javascript';
    s.async = true;
    s.src = 'https://ucarecdn.com/widget/2.8.2/uploadcare/uploadcare.full.min.js';

    s.onload = function() {
        var widget = uploadcare.Widget('[role=uploadcare-uploader]');
        widget.onDialogOpen(function(dialog){
            resize(618, 500);

            dialog.always(function() {
                resize(458, 32);

            });
        });
        widget.onUploadComplete(function(info) {
            file = info.cdnUrl;
        });
    };

    document.body.appendChild(s);
});<commit_msg>update index.js<commit_after>function resize(w, h) {
    JFCustomWidget.requestFrameResize({
        width: w,
        height: h
    });
}

JFCustomWidget.subscribe('ready', function(){
    var fileOrGroupUUID = null;

    JFCustomWidget.subscribe("submit", function(){
        var msg = {
            valid: !!fileOrGroupUUID,
            value: fileOrGroupUUID
        };
        JFCustomWidget.sendSubmit(msg);
    });

    uploadcare.start({
        publicKey: JFCustomWidget.getWidgetSetting('publicKey'),
        locale: JFCustomWidget.getWidgetSetting('locale') || 'en',
        imagesOnly: (JFCustomWidget.getWidgetSetting('imagesOnly') == 'Yes'),
        multiple: (JFCustomWidget.getWidgetSetting('multiple') == 'Yes'),
        previewStep: (JFCustomWidget.getWidgetSetting('previewStep') == 'Yes'),
        tabs: 'all'
    });

    var widget = uploadcare.Widget('[role=uploadcare-uploader]');

    widget.onDialogOpen(function(dialog){
        resize(618, 600);

        dialog.always(function() {
            resize(458, 32);

        });
    });
    widget.onUploadComplete(function(info) {
        fileOrGroupUUID = info.uuid;
    });
});
{'fraction_non_alphanumeric': 0.14490311710193765, 'fraction_numerical': 0.010530749789385004, 'mean_word_length': 2.6482334869431643, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1150370', 'n_tokens_mistral': 744, 'n_tokens_neox': 710, 'n_words': 106}