chrome-types 0.1.38 → 0.1.39
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/index.d.ts +161 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -80,7 +80,7 @@ declare namespace browserAction {
|
|
|
80
80
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
// Generated on
|
|
83
|
+
// Generated on Wed Sep 15 2021 22:23:37 GMT+0000 (Coordinated Universal Time)
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
declare namespace chrome {
|
|
@@ -3663,6 +3663,20 @@ declare namespace chrome {
|
|
|
3663
3663
|
|
|
3664
3664
|
export interface ContentSetting<T> {
|
|
3665
3665
|
|
|
3666
|
+
/**
|
|
3667
|
+
* Clear all content setting rules set by this extension.
|
|
3668
|
+
*
|
|
3669
|
+
* @param details
|
|
3670
|
+
*/
|
|
3671
|
+
clear(
|
|
3672
|
+
details: {
|
|
3673
|
+
/**
|
|
3674
|
+
* Where to clear the setting (default: regular).
|
|
3675
|
+
*/
|
|
3676
|
+
scope?: Scope,
|
|
3677
|
+
},
|
|
3678
|
+
): Promise<{}>;
|
|
3679
|
+
|
|
3666
3680
|
/**
|
|
3667
3681
|
* Clear all content setting rules set by this extension.
|
|
3668
3682
|
*
|
|
@@ -3679,6 +3693,42 @@ declare namespace chrome {
|
|
|
3679
3693
|
callback?: () => void,
|
|
3680
3694
|
): void;
|
|
3681
3695
|
|
|
3696
|
+
/**
|
|
3697
|
+
* Gets the current content setting for a given pair of URLs.
|
|
3698
|
+
*
|
|
3699
|
+
* @param details
|
|
3700
|
+
*/
|
|
3701
|
+
get(
|
|
3702
|
+
details: {
|
|
3703
|
+
/**
|
|
3704
|
+
* The primary URL for which the content setting should be retrieved. Note that the meaning of a primary URL depends on the content type.
|
|
3705
|
+
*/
|
|
3706
|
+
primaryUrl: string,
|
|
3707
|
+
|
|
3708
|
+
/**
|
|
3709
|
+
* The secondary URL for which the content setting should be retrieved. Defaults to the primary URL. Note that the meaning of a secondary URL depends on the content type, and not all content types use secondary URLs.
|
|
3710
|
+
*/
|
|
3711
|
+
secondaryUrl?: string,
|
|
3712
|
+
|
|
3713
|
+
/**
|
|
3714
|
+
* A more specific identifier of the type of content for which the settings should be retrieved.
|
|
3715
|
+
*/
|
|
3716
|
+
resourceIdentifier?: ResourceIdentifier,
|
|
3717
|
+
|
|
3718
|
+
/**
|
|
3719
|
+
* Whether to check the content settings for an incognito session. (default false)
|
|
3720
|
+
*/
|
|
3721
|
+
incognito?: boolean,
|
|
3722
|
+
},
|
|
3723
|
+
): Promise<{
|
|
3724
|
+
details: {
|
|
3725
|
+
/**
|
|
3726
|
+
* The content setting. See the description of the individual ContentSetting objects for the possible values.
|
|
3727
|
+
*/
|
|
3728
|
+
setting: T,
|
|
3729
|
+
},
|
|
3730
|
+
}>;
|
|
3731
|
+
|
|
3682
3732
|
/**
|
|
3683
3733
|
* Gets the current content setting for a given pair of URLs.
|
|
3684
3734
|
*
|
|
@@ -3717,6 +3767,40 @@ declare namespace chrome {
|
|
|
3717
3767
|
) => void,
|
|
3718
3768
|
): void;
|
|
3719
3769
|
|
|
3770
|
+
/**
|
|
3771
|
+
* Applies a new content setting rule.
|
|
3772
|
+
*
|
|
3773
|
+
* @param details
|
|
3774
|
+
*/
|
|
3775
|
+
set(
|
|
3776
|
+
details: {
|
|
3777
|
+
/**
|
|
3778
|
+
* The pattern for the primary URL. For details on the format of a pattern, see [Content Setting Patterns](https://developer.chrome.com/docs/extensions/reference/contentSettings/#patterns).
|
|
3779
|
+
*/
|
|
3780
|
+
primaryPattern: string,
|
|
3781
|
+
|
|
3782
|
+
/**
|
|
3783
|
+
* The pattern for the secondary URL. Defaults to matching all URLs. For details on the format of a pattern, see [Content Setting Patterns](https://developer.chrome.com/docs/extensions/reference/contentSettings/#patterns).
|
|
3784
|
+
*/
|
|
3785
|
+
secondaryPattern?: string,
|
|
3786
|
+
|
|
3787
|
+
/**
|
|
3788
|
+
* The resource identifier for the content type.
|
|
3789
|
+
*/
|
|
3790
|
+
resourceIdentifier?: ResourceIdentifier,
|
|
3791
|
+
|
|
3792
|
+
/**
|
|
3793
|
+
* The setting applied by this rule. See the description of the individual ContentSetting objects for the possible values.
|
|
3794
|
+
*/
|
|
3795
|
+
setting: T,
|
|
3796
|
+
|
|
3797
|
+
/**
|
|
3798
|
+
* Where to set the setting (default: regular).
|
|
3799
|
+
*/
|
|
3800
|
+
scope?: Scope,
|
|
3801
|
+
},
|
|
3802
|
+
): Promise<{}>;
|
|
3803
|
+
|
|
3720
3804
|
/**
|
|
3721
3805
|
* Applies a new content setting rule.
|
|
3722
3806
|
*
|
|
@@ -3753,6 +3837,13 @@ declare namespace chrome {
|
|
|
3753
3837
|
callback?: () => void,
|
|
3754
3838
|
): void;
|
|
3755
3839
|
|
|
3840
|
+
getResourceIdentifiers(): Promise<{
|
|
3841
|
+
/**
|
|
3842
|
+
* A list of resource identifiers for this content type, or undefined if this content type does not use resource identifiers.
|
|
3843
|
+
*/
|
|
3844
|
+
resourceIdentifiers?: ResourceIdentifier[],
|
|
3845
|
+
}>;
|
|
3846
|
+
|
|
3756
3847
|
/**
|
|
3757
3848
|
* @param callback
|
|
3758
3849
|
*/
|
|
@@ -18373,6 +18464,41 @@ declare namespace chrome {
|
|
|
18373
18464
|
*/
|
|
18374
18465
|
export interface ChromeSetting<T> {
|
|
18375
18466
|
|
|
18467
|
+
/**
|
|
18468
|
+
* Gets the value of a setting.
|
|
18469
|
+
*
|
|
18470
|
+
* @param details Which setting to consider.
|
|
18471
|
+
*/
|
|
18472
|
+
get(
|
|
18473
|
+
details: {
|
|
18474
|
+
/**
|
|
18475
|
+
* Whether to return the value that applies to the incognito session (default false).
|
|
18476
|
+
*/
|
|
18477
|
+
incognito?: boolean,
|
|
18478
|
+
},
|
|
18479
|
+
): Promise<{
|
|
18480
|
+
/**
|
|
18481
|
+
* Details of the currently effective value.
|
|
18482
|
+
*/
|
|
18483
|
+
details: {
|
|
18484
|
+
/**
|
|
18485
|
+
* The value of the setting.
|
|
18486
|
+
*/
|
|
18487
|
+
value: T,
|
|
18488
|
+
|
|
18489
|
+
/**
|
|
18490
|
+
* The level of control of the setting.
|
|
18491
|
+
*/
|
|
18492
|
+
levelOfControl: LevelOfControl,
|
|
18493
|
+
|
|
18494
|
+
/**
|
|
18495
|
+
* Whether the effective value is specific to the incognito session.
|
|
18496
|
+
* This property will _only_ be present if the incognito property in the details parameter of `get()` was true.
|
|
18497
|
+
*/
|
|
18498
|
+
incognitoSpecific?: boolean,
|
|
18499
|
+
},
|
|
18500
|
+
}>;
|
|
18501
|
+
|
|
18376
18502
|
/**
|
|
18377
18503
|
* Gets the value of a setting.
|
|
18378
18504
|
*
|
|
@@ -18410,6 +18536,26 @@ declare namespace chrome {
|
|
|
18410
18536
|
) => void,
|
|
18411
18537
|
): void;
|
|
18412
18538
|
|
|
18539
|
+
/**
|
|
18540
|
+
* Sets the value of a setting.
|
|
18541
|
+
*
|
|
18542
|
+
* @param details Which setting to change.
|
|
18543
|
+
*/
|
|
18544
|
+
set(
|
|
18545
|
+
details: {
|
|
18546
|
+
/**
|
|
18547
|
+
* The value of the setting.
|
|
18548
|
+
* Note that every setting has a specific value type, which is described together with the setting. An extension should _not_ set a value of a different type.
|
|
18549
|
+
*/
|
|
18550
|
+
value: T,
|
|
18551
|
+
|
|
18552
|
+
/**
|
|
18553
|
+
* Where to set the setting (default: regular).
|
|
18554
|
+
*/
|
|
18555
|
+
scope?: ChromeSettingScope,
|
|
18556
|
+
},
|
|
18557
|
+
): Promise<{}>;
|
|
18558
|
+
|
|
18413
18559
|
/**
|
|
18414
18560
|
* Sets the value of a setting.
|
|
18415
18561
|
*
|
|
@@ -18432,6 +18578,20 @@ declare namespace chrome {
|
|
|
18432
18578
|
callback?: () => void,
|
|
18433
18579
|
): void;
|
|
18434
18580
|
|
|
18581
|
+
/**
|
|
18582
|
+
* Clears the setting, restoring any default value.
|
|
18583
|
+
*
|
|
18584
|
+
* @param details Which setting to clear.
|
|
18585
|
+
*/
|
|
18586
|
+
clear(
|
|
18587
|
+
details: {
|
|
18588
|
+
/**
|
|
18589
|
+
* Where to clear the setting (default: regular).
|
|
18590
|
+
*/
|
|
18591
|
+
scope?: ChromeSettingScope,
|
|
18592
|
+
},
|
|
18593
|
+
): Promise<{}>;
|
|
18594
|
+
|
|
18435
18595
|
/**
|
|
18436
18596
|
* Clears the setting, restoring any default value.
|
|
18437
18597
|
*
|