fix: log whitelist wildcards (#175)

* chore: support for whitelist wildcards

* chore: solve warning on check html element

* chore: bump version 3.0.5
This commit is contained in:
Juan Sebastian velez Posada
2023-03-09 10:55:41 -05:00
committed by GitHub
parent 65c85d7264
commit c735e2dafa
4 changed files with 18 additions and 8 deletions

View File

@@ -1,15 +1,15 @@
/* eslint-disable no-fallthrough */
/* eslint-disable default-case */
import axios, { AxiosResponse } from 'axios';
import { IDBPDatabase, openDB } from 'idb';
import moment from 'moment';
import browser, { Tabs } from 'webextension-polyfill';
import { IDBPDatabase, openDB } from 'idb';
import { ApiKeyPayload, AxiosUserResponse, User } from '../types/user';
import config from '../config/config';
import { SummariesPayload, GrandTotal } from '../types/summaries';
import { SendHeartbeat } from '../types/heartbeats';
import { GrandTotal, SummariesPayload } from '../types/summaries';
import { ApiKeyPayload, AxiosUserResponse, User } from '../types/user';
import changeExtensionState from '../utils/changeExtensionState';
import contains from '../utils/contains';
import { SendHeartbeat } from '../types/heartbeats';
import getDomainFromUrl from '../utils/getDomainFromUrl';
class WakaTimeCore {
@@ -226,6 +226,16 @@ class WakaTimeCore {
url: schema + urlFromLine,
};
}
const lineRe = new RegExp(cleanLine.replace('.', '.').replace('*', '.*'));
// If url matches the current line return true
if (lineRe.test(url)) {
return {
project: null,
url: schema + urlFromLine,
};
}
}
return {