We’ve released a new and improved web extension SDK underDocumentation Index
Fetch the complete documentation index at: https://docs.onsleek.ai/llms.txt
Use this file to discover all available pages before exploring further.
@sleek/web-ext-sdk, replacing the legacy @sleek/web-ext-coupon-sdk. This new SDK brings enhanced performance, additional capabilities, and a more extensible foundation for future features.
If you’re currently using @sleek/web-ext-coupon-sdk, follow the guide below to migrate to @sleek/web-ext-sdk.
Summary of Key Changes
| Feature | @sleek/web-ext-coupon-sdk | @sleek/web-ext-sdk |
|---|---|---|
| Core methods | initializeSleekSdk, getSdkInstance | initializeWebExtSdk, getWebExtSdk |
| Script files | fc.js, f.js, t.js | mf.js, f.js |
| Events | Mainly coupon-focused | Coupon, classification, product, order, affiliate activation detection |
| Performance | Legacy | More performant and modular |
| Type Safety | Typed | Stronger types, extensible event system |
| Permissions | Requires alarms permission | alarms permission no longer required |
1. Update Your Dependency
Update your.npmrc if not already configured:
2. Update Static Script Inclusion
Old:manifest.json.
3. Update Permissions
Ensure your manifest includes:4. Update Initialization
Old:5. Update Event Handling
Old:6. Update SDK Usage
The new@sleek/web-ext-sdk introduces a more modular and intuitive API design. Instead of global functions, you now operate on a specific tab context using .onTab(tabId) for all tab-related actions.
Here’s a mapping of commonly used methods to help you migrate:
Legacy @sleek/web-ext-coupon-sdk | New @sleek/web-ext-sdk |
|---|---|
getSdkInstance().fillCouponsOnTab(tabId, options?: FillCouponsOnTabOptions) | getWebExtSdk().onTab(tabId).startCouponAutoApply(codes) |
getSdkInstance().cancelCouponsOnTab(tabId) | getWebExtSdk().onTab(tabId).stopCouponAutoApply() |
getSdkInstance().classifyPageOnTab(tabId) | getWebExtSdk().onTab(tabId).classifyPage() |
getSdkInstance().extractProductsOnTab(tabId, options?: ExtractProductsOnTabOptions) | getWebExtSdk().onTab(tabId).extractProducts(options?: ExtractProductsOptions) |
getSdkInstance().extractOrderOnTab(tabId) | getWebExtSdk().onTab(tabId).extractOrder() |
Before (Legacy SDK)
After (New SDK)
New Capabilities
- Coupon auto-apply
- Page classification
- Product extraction
- Order extraction
- Affiliate activation detection
- Installed extension discovery
Updated TypeDoc
Explore new capabilities:Coupon auto-apply
Page classification
Product extraction
Order extraction
Affiliate activation detection
Installed extensions
View TypeDoc
Need help? Contact support@onsleek.com for questions or migration assistance.

