-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.html
More file actions
105 lines (95 loc) · 4.48 KB
/
options.html
File metadata and controls
105 lines (95 loc) · 4.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dify Extension - 設定</title>
<link rel="stylesheet" href="styles/options.css">
</head>
<body>
<div id="app">
<header class="header">
<h1>Dify Extension 設定</h1>
</header>
<main class="main">
<div class="container">
<section class="section">
<h2>基本設定</h2>
<div class="form-group">
<label for="difyAppUrl">DifyアプリURL <span class="required">*</span></label>
<input type="url" id="difyAppUrl" placeholder="https://udify.app/chatbot/your-app-id" />
<p class="help-text">
Difyでデプロイしたアプリの公開URLを入力してください。<br>
例: https://udify.app/chatbot/12345678-1234-1234-1234-123456789abc
</p>
</div>
<div class="form-group">
<label class="checkbox-label">
<input type="checkbox" id="isEnabled" />
<span class="checkmark"></span>
拡張機能を有効にする
</label>
</div>
</section>
<section class="section">
<h2>サイト制御</h2>
<div class="tabs">
<button class="tab-button active" data-tab="whitelist">ホワイトリスト</button>
<button class="tab-button" data-tab="blacklist">ブラックリスト</button>
</div>
<div id="whitelist" class="tab-content active">
<p class="tab-description">
指定したサイトでのみ拡張機能を有効にします。空の場合は全サイトで有効になります。
</p>
<div class="site-input">
<input type="text" id="whitelistInput" placeholder="example.com" />
<button id="addWhitelistBtn" class="btn-add">追加</button>
</div>
<div id="whitelistItems" class="site-list"></div>
</div>
<div id="blacklist" class="tab-content">
<p class="tab-description">
指定したサイトではフローティングボタン(💬)を表示しません。サイドパネルやポップアップからは引き続き利用可能です。
</p>
<div class="site-input">
<input type="text" id="blacklistInput" placeholder="example.com" />
<button id="addBlacklistBtn" class="btn-add">追加</button>
</div>
<div id="blacklistItems" class="site-list"></div>
</div>
</section>
<section class="section">
<h2>コンテンツ抽出設定</h2>
<div class="form-group">
<label class="checkbox-label">
<input type="checkbox" id="autoExtractEnabled" />
<span class="checkmark"></span>
自動コンテンツ抽出を有効にする
</label>
<p class="help-text">
サイドパネルを開いた時や、ページ遷移・タブ切り替え時(2.5秒後)に自動でコンテンツを抽出します。<br>
無効にすると手動更新ボタン(🔄)のみでコンテンツを取得できます。
</p>
</div>
<div class="form-group">
<label for="extractSelectors">カスタム抽出セレクタ(上級者向け)</label>
<textarea id="extractSelectors" rows="4" placeholder="article, .content, #main-content"></textarea>
<p class="help-text">
<strong>デフォルト:</strong> ページのbody全体から不要要素(広告、ナビ、フッター等)を除外して抽出<br>
<strong>YouTube:</strong> 動画ページでは字幕データを優先的に抽出<br>
<strong>カスタム:</strong> カンマ区切りでCSSセレクタを指定すると、指定要素のみを抽出します<br>
例: <code>article, .post-content, #main</code>
</p>
</div>
</section>
<div class="actions">
<button id="saveBtn" class="btn-primary">設定を保存</button>
<button id="resetBtn" class="btn-secondary">リセット</button>
</div>
<div id="message" class="message hidden"></div>
</div>
</main>
</div>
<script src="src/options.js"></script>
</body>
</html>