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:
committed by
GitHub
parent
65c85d7264
commit
c735e2dafa
@@ -1,4 +1,4 @@
|
||||
import React, { useRef, useState, useEffect } from 'react';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import config, { SuccessOrFailType } from '../config/config';
|
||||
import apiKeyInvalid from '../utils/apiKey';
|
||||
import { logUserIn } from '../utils/user';
|
||||
@@ -253,7 +253,7 @@ export default function Options(): JSX.Element {
|
||||
<div
|
||||
onClick={() => setState({ ...state, trackSocialMedia: !state.trackSocialMedia })}
|
||||
>
|
||||
<input type="checkbox" checked={state.trackSocialMedia} />
|
||||
<input type="checkbox" defaultChecked={state.trackSocialMedia} />
|
||||
<span>Track social media sites</span>
|
||||
</div>
|
||||
<button
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -26,5 +26,5 @@
|
||||
"page": "options.html"
|
||||
},
|
||||
"permissions": ["alarms", "tabs", "storage", "idle"],
|
||||
"version": "3.0.4"
|
||||
"version": "3.0.5"
|
||||
}
|
||||
|
||||
@@ -39,5 +39,5 @@
|
||||
"storage",
|
||||
"idle"
|
||||
],
|
||||
"version": "3.0.4"
|
||||
"version": "3.0.5"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user