Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 33 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,25 @@ Follow these simple steps to set up **Vacabulary Assistant** in your browser. No
### **1️⃣ Install Dependencies**
Open a terminal and run the following command to install all required dependencies:
```sh
npm install
npm install --legacy-peer-deps
```

### **2️⃣ Build the Extension**
Compile the project by running:

**Для разработки и отладки:**
```sh
npm run build
npm run dev
```
This will generate the necessary files:
- `page/page.ts`
- `popup/popup.ts`
Это создаст файлы с source maps для отладки:
- `dist/page/page.js` + `dist/page/page.js.map`
- `dist/popup/popup.js` + `dist/popup/popup.js.map`
- `dist/popup/popup.html`

**Для production:**
```sh
npm run build:prod
```
Это создаст минифицированные файлы для продакшена.

### **3️⃣ Enable Developer Mode in Chrome**
1. Open Google Chrome and navigate to:
Expand All @@ -64,7 +72,25 @@ This will generate the necessary files:
- You should see an option to save it to your vocabulary list.
- Open the extension popup to view and manage your saved words.

### **6️⃣ You're All Set! 🎉**
### **6️⃣ Debugging 🔧**

**Для отладки ошибок:**
1. Используйте `npm run dev` для сборки с source maps
2. Откройте DevTools в Chrome (F12)
3. Перейдите на вкладку Sources
4. Найдите файлы в папке `webpack://` → `src/`
5. Установите breakpoints для отладки

**Пример отладки ошибки:**
```javascript
// Вместо минифицированного кода:
// TypeError: e.getBoundingClientRect is not a function at page.js:1:36036

// Теперь вы увидите исходный код:
// TypeError: e.getBoundingClientRect is not a function at ApiPageService.js:45:12
```

### **7️⃣ You're All Set! 🎉**
Your **Vacabulary Assistant** extension is now installed and ready to help you expand your vocabulary! If you encounter any issues, check the [GitHub Issues](https://github.com/Reckue/reckue-langs/issues) page or contribute improvements.

## Updates History:
Expand Down
29 changes: 29 additions & 0 deletions check-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

echo "🔍 Проверка версии плагина..."

# Проверяем версию в package.json
PACKAGE_VERSION=$(grep '"version"' package.json | cut -d'"' -f4)
echo "📦 Package.json версия: $PACKAGE_VERSION"

# Проверяем версию в manifest.json
MANIFEST_VERSION=$(grep '"version"' manifest.json | cut -d'"' -f4)
echo "📋 Manifest.json версия: $MANIFEST_VERSION"

# Проверяем имя в manifest.json
MANIFEST_NAME=$(grep '"name"' manifest.json | cut -d'"' -f4)
echo "🏷️ Имя плагина: $MANIFEST_NAME"

# Определяем тип версии
if [[ $PACKAGE_VERSION == *"api"* ]]; then
echo "✅ Текущая версия: API (синхронизация с сервером)"
elif [[ $PACKAGE_VERSION == *"local"* ]]; then
echo "✅ Текущая версия: Local (локальное хранение)"
else
echo "❓ Неизвестная версия"
fi

echo ""
echo "📝 Для переключения версий используйте:"
echo " ./switch-to-api.sh - переключиться на API версию"
echo " ./switch-to-local.sh - переключиться на локальную версию"
3,649 changes: 3,648 additions & 1 deletion dist/page/page.js

Large diffs are not rendered by default.

2,316 changes: 2,315 additions & 1 deletion dist/popup/popup.js

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "Reckue Languages",
"version": "0.5.7",
"description": "Interactive language learning assistant",
"name": "Reckue Languages (API)",
"version": "0.6.0",
"description": "Interactive language learning assistant with API integration",
"permissions": ["storage", "activeTab", "tabs"],
"host_permissions": ["https://api.reckue.com/*"],
"background": {
"service_worker": "background/application.js"
},
"action": {
"default_popup": "dist/popup/index.html",
"default_popup": "dist/popup/popup.html",
"default_icon": {
"16": "images/coach16.png",
"32": "images/coach32.png",
Expand All @@ -32,4 +33,4 @@
"128": "images/coach128.png"
},
"manifest_version": 3
}
}
35 changes: 35 additions & 0 deletions manifest.json.backup
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "Reckue Languages (Local)",
"version": "0.5.7-local",
"description": "Interactive language learning assistant",
"permissions": ["storage", "activeTab", "tabs"],
"background": {
"service_worker": "background/application.js"
},
"action": {
"default_popup": "dist/popup/index.html",
"default_icon": {
"16": "images/coach16.png",
"32": "images/coach32.png",
"48": "images/coach48.png",
"128": "images/coach128.png"
}
},
"content_scripts": [
{
"matches": ["http://*/*", "https://*/*"],
"exclude_matches": ["https://translate.google.com/*"],
"run_at": "document_idle",
"js": [
"dist/page/page.js"
]
}
],
"icons": {
"16": "images/coach16.png",
"32": "images/coach32.png",
"48": "images/coach48.png",
"128": "images/coach128.png"
},
"manifest_version": 3
}
Loading