aboutsummaryrefslogtreecommitdiffstats
path: root/uncompressed/franz-custom-website/index.js
blob: 86c32276a0cb4f88e6c43c3cea6acfcc3d9779e8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"use strict";

module.exports = Franz => class CustomWebsite extends Franz {
  async validateUrl(url) {
    try {
      const resp = await window.fetch(url, {
        method: 'GET'
      });
      return resp.status.toString().startsWith('2');
    } catch (err) {
      console.error(err);
    }

    return false;
  }

};