<commit_before>/* global __whmEventSourceWrapper */
Object.keys(__whmEventSourceWrapper).forEach((key) => {
  __whmEventSourceWrapper[key].addMessageListener((event) => {
    try {
      const data = JSON.parse(event.data);

      if (data.action === 'shopify_upload_finished') {
        // eslint-disable-next-line
        console.log('new files uploaded on shopify, you may want to refresh.');
        // window.location.reload();
      }
    } catch (ex) {
      // swallow the error... sometimes event.data is an emoji.. ?
    }
  });
});<commit_msg>Reload page after shopify upload complete<commit_after>/* global __whmEventSourceWrapper */
Object.keys(__whmEventSourceWrapper).forEach((key) => {
  __whmEventSourceWrapper[key].addMessageListener((event) => {
    try {
      const data = JSON.parse(event.data);

      if (data.action === 'shopify_upload_finished') {
        window.location.reload();
      }
    } catch (ex) {
      // swallow the error... sometimes event.data is an emoji.. ?
    }
  });
});
{'fraction_non_alphanumeric': 0.14847590953785644, 'fraction_numerical': 0.0, 'mean_word_length': 2.9765625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '575042', 'n_tokens_mistral': 304, 'n_tokens_neox': 303, 'n_words': 62}