mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 14:17:13 +01:00
Ability to unregister umami
This commit is contained in:
parent
8727dbf282
commit
2ea91aaabf
2 changed files with 15 additions and 5 deletions
|
|
@ -39,12 +39,14 @@ export const put = (url, params) => apiRequest('put', url, JSON.stringify(params
|
|||
|
||||
export const hook = (_this, method, callback) => {
|
||||
const orig = _this[method];
|
||||
|
||||
return (...args) => {
|
||||
_this[method] = (...args) => {
|
||||
callback.apply(null, args);
|
||||
|
||||
return orig.apply(_this, args);
|
||||
};
|
||||
|
||||
return () => {
|
||||
_this[method] = orig;
|
||||
};
|
||||
};
|
||||
|
||||
export const doNotTrack = () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue