メロウテル要素
Mellowtel Elementsをブラウザー拡張機能に実装する
ここでは、Mellowtel Elementsをブラウザー拡張機能に統合し、シームレスなユーザー同意管理を実現する方法を紹介します。
完璧です!これで、あなたの拡張機能はMellowtel Elementsを使用して、シームレスなオプトイン、オプトアウト、設定管理が可能になりました。
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
npm install mellowtel-elements
<!-- popup.htmlまたはオプションページに -->
<div id="opt-in-container"></div>
<div id="opt-out-container"></div>
<div id="settings-container"></div>
import { MellowtelElements } from 'mellowtel-elements';
// 拡張機能IDと設定キーでインスタンスを作成
const mellowtel = new MellowtelElements(
'your-extension-id-here', // 拡張機能ID
'your-config-key-here' // 設定キー
);
// オプトイン要素を作成
await mellowtel.createElement('opt-in-container', { type: 'opt-in' });
// オプトアウト要素を作成
await mellowtel.createElement('opt-out-container', { type: 'opt-out' });
// 設定要素を作成
await mellowtel.createElement('settings-container', { type: 'settings' });