text: "use strict";
  const fs = require('fs');
  var _path = _interopRequireDefault(require("path"));
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  module.exports = Franz => {
    const getMessages = function getMessages() {
      let count = 0;
  
      if (document.getElementsByClassName('J-Ke n0').length > 0) {
        if (document.getElementsByClassName('J-Ke n0')[0].getAttribute('aria-label') != null) {
          count = parseInt(document.getElementsByClassName('J-Ke n0')[0].getAttribute('aria-label').replace(/[^0-9.]/g, ''), 10);
        }
      }
  
      count = parseInt(count, 10);
  
      if (isNaN(count)) {
        count = 0;
      }
  
      Franz.setBadge(count);
    };
  
    const cssFiles = fs.readdirSync(__dirname)
      .filter((fileName) => (fileName.endsWith('.css')))
      .map((fileName) => _path.default.join(__dirname, fileName));
    Franz.injectCSS(...cssFiles);
    Franz.loop(getMessages);
  };
  