wineater-bot 2.1.3 → 2.1.4
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/dist/wineater-chatbot.mjs +464 -478
- package/dist/wineater-chatbot.umd.js +25 -25
- package/package.json +1 -1
- package/src/js/auto-open.js +4 -4
package/package.json
CHANGED
package/src/js/auto-open.js
CHANGED
|
@@ -38,16 +38,16 @@ export async function shouldOpenChatAutomatically() {
|
|
|
38
38
|
if (regex.test(currentURL)) {
|
|
39
39
|
try {
|
|
40
40
|
// Get meta title and description from the document
|
|
41
|
-
const metaTitle = document.querySelector('meta[name="title"]')?.getAttribute('content') || document.title;
|
|
42
|
-
const metaDescription = document.querySelector('meta[name="description"]')?.getAttribute('content') || '';
|
|
41
|
+
// const metaTitle = document.querySelector('meta[name="title"]')?.getAttribute('content') || document.title;
|
|
42
|
+
// const metaDescription = document.querySelector('meta[name="description"]')?.getAttribute('content') || '';
|
|
43
43
|
|
|
44
44
|
// Fetch dishes based on meta data
|
|
45
|
-
const dishes = await api.getPossibleDishesWithMeta(metaTitle, metaDescription);
|
|
45
|
+
// const dishes = await api.getPossibleDishesWithMeta(metaTitle, metaDescription);
|
|
46
46
|
|
|
47
47
|
console.log(dishes);
|
|
48
48
|
|
|
49
49
|
const timer = setTimeout(() => {
|
|
50
|
-
|
|
50
|
+
openChatWindow(); // Открыть чат с блюдами через 15 секунд
|
|
51
51
|
}, 15000); // 15000 миллисекунд = 15 секунд
|
|
52
52
|
|
|
53
53
|
// Сохраняем таймер, чтобы можно было его сбросить при ручном открытии чата
|