@givefreely/adunit 1.18.2-pip.2 → 2.0.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GiveFreely-background.cjs.js +1 -1
- package/GiveFreely-background.cjs.js.map +1 -1
- package/GiveFreely-background.esm.js +1 -1
- package/GiveFreely-background.esm.js.map +1 -1
- package/GiveFreely-content.cjs.js +1 -1
- package/GiveFreely-content.cjs.js.map +1 -1
- package/GiveFreely-content.esm.js +1 -1
- package/GiveFreely-content.esm.js.map +1 -1
- package/LICENSE +1 -1
- package/package.json +2 -2
- package/types/GiveFreely-types.d.ts +9 -9
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
PROPRIETARY LICENSE AGREEMENT
|
|
2
2
|
|
|
3
|
-
GiveFreely
|
|
3
|
+
GiveFreely NPM PACKAGE LICENSE
|
|
4
4
|
|
|
5
5
|
This is a legal agreement between you (either an individual or an entity) and Give Freely regarding your use of the Ad Unit software package and accompanying documentation (collectively referred to as the "Software").
|
|
6
6
|
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ export { default as browser } from 'webextension-polyfill';
|
|
|
4
4
|
* Filters out domains where the popup should stand down.
|
|
5
5
|
* Should return false in case the popup should not be shown for a specific domain
|
|
6
6
|
*/
|
|
7
|
-
type
|
|
7
|
+
type DomainFilter = (domain: string) => Promise<boolean>;
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Main service for GiveFreely functionality
|
|
@@ -12,12 +12,12 @@ type DomainAdUnitFilter = (domain: string) => Promise<boolean>;
|
|
|
12
12
|
* Example usage:
|
|
13
13
|
*
|
|
14
14
|
* const giveFreely = new GiveFreely.GiveFreelyService(PARTNER_KEY);
|
|
15
|
-
* const
|
|
15
|
+
* const domainFilter = async (domain) => {
|
|
16
16
|
* const result = !(domain === 'www.temu.com')
|
|
17
17
|
* return result
|
|
18
18
|
* }
|
|
19
19
|
*
|
|
20
|
-
* giveFreely.initialize(
|
|
20
|
+
* giveFreely.initialize(domainFilter)
|
|
21
21
|
* .then(() => {
|
|
22
22
|
* // Log to show the background script is running
|
|
23
23
|
* console.log('GiveFreely background running');
|
|
@@ -25,19 +25,19 @@ type DomainAdUnitFilter = (domain: string) => Promise<boolean>;
|
|
|
25
25
|
*/
|
|
26
26
|
declare class GiveFreelyService {
|
|
27
27
|
readonly partnerApiKey: string;
|
|
28
|
-
private readonly
|
|
28
|
+
private readonly _coreService;
|
|
29
29
|
constructor(partnerApiKey: string);
|
|
30
|
-
initialize: (partnerFilter?:
|
|
30
|
+
initialize: (partnerFilter?: DomainFilter) => Promise<void>;
|
|
31
31
|
destroy: () => Promise<void>;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
declare const
|
|
34
|
+
declare const isGiveFreelyMessage: (message: unknown) => boolean;
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* Initializes the GiveFreely
|
|
37
|
+
* Initializes the GiveFreely UI by creating a
|
|
38
38
|
* shadow DOM and rendering the main app component.
|
|
39
39
|
* @returns The store instance
|
|
40
40
|
*/
|
|
41
|
-
declare function
|
|
41
|
+
declare function initialize(): Promise<void>;
|
|
42
42
|
|
|
43
|
-
export { GiveFreelyService,
|
|
43
|
+
export { GiveFreelyService, initialize, isGiveFreelyMessage };
|