Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2361df7da9 | ||
|
|
74a50ab8f6 | ||
|
|
0cf53e8fe0 | ||
|
|
c3f538fe15 |
@ -6,6 +6,7 @@ Chrome расширение для улучшенного просмотра Ins
|
|||||||
|
|
||||||
- **Управление громкостью** - Вертикальный слайдер для точной настройки громкости видео
|
- **Управление громкостью** - Вертикальный слайдер для точной настройки громкости видео
|
||||||
- **Загрузка роликов** - Скачивайте рилсы одним кликом
|
- **Загрузка роликов** - Скачивайте рилсы одним кликом
|
||||||
|
- **Перемотка видео** - Используйте слайдер для перемотки рилса, если пропустили интересный момент, больше не придется пересматривать всё видео!
|
||||||
|
|
||||||
## Установка
|
## Установка
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "reels-master",
|
"name": "reels-master",
|
||||||
"version": "1.1.0",
|
"version": "1.1.2",
|
||||||
"description": "Chrome extension for Instagram Reels with volume control and download functionality",
|
"description": "Chrome extension for Instagram Reels with volume control and download functionality",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -198,6 +198,37 @@ class ReelsMaster {
|
|||||||
'svg[aria-label="Speichern"]',
|
'svg[aria-label="Speichern"]',
|
||||||
'svg[aria-label="保存"]',
|
'svg[aria-label="保存"]',
|
||||||
].join(',');
|
].join(',');
|
||||||
|
|
||||||
|
private readonly FOLLOW_TEXTS = [
|
||||||
|
'Follow',
|
||||||
|
'Подписаться',
|
||||||
|
'Seguir',
|
||||||
|
'Suivre',
|
||||||
|
'Folgen',
|
||||||
|
'Following',
|
||||||
|
'Подписки',
|
||||||
|
'Siguiendo',
|
||||||
|
'Abonné(e)',
|
||||||
|
'Gefolgt',
|
||||||
|
'Requested',
|
||||||
|
'Запрос отправлен',
|
||||||
|
'Solicitado',
|
||||||
|
'Demandé',
|
||||||
|
'Anfrage gesendet',
|
||||||
|
'フォローする',
|
||||||
|
'关注',
|
||||||
|
];
|
||||||
|
|
||||||
|
private readonly AVATAR_SELECTORS = [
|
||||||
|
'img[alt*="profile picture"]',
|
||||||
|
'img[alt*="Фото профиля"]',
|
||||||
|
'img[alt*="фото профиля"]',
|
||||||
|
'img[alt*="Foto de perfil"]',
|
||||||
|
'img[alt*="Photo de profil"]',
|
||||||
|
'img[alt*="Profilbild"]',
|
||||||
|
'img[alt*="プロフィール写真"]',
|
||||||
|
'img[alt*="头像"]',
|
||||||
|
].join(',');
|
||||||
|
|
||||||
private findAllActionContainers(): HTMLElement[] {
|
private findAllActionContainers(): HTMLElement[] {
|
||||||
const containers: HTMLElement[] = [];
|
const containers: HTMLElement[] = [];
|
||||||
@ -481,13 +512,14 @@ class ReelsMaster {
|
|||||||
const followButtons = document.querySelectorAll('[role="button"]');
|
const followButtons = document.querySelectorAll('[role="button"]');
|
||||||
|
|
||||||
for (const button of followButtons) {
|
for (const button of followButtons) {
|
||||||
if (button.textContent?.trim() === 'Follow') {
|
const text = button.textContent?.trim();
|
||||||
|
if (text && this.FOLLOW_TEXTS.includes(text)) {
|
||||||
let parent = button.parentElement;
|
let parent = button.parentElement;
|
||||||
let depth = 0;
|
let depth = 0;
|
||||||
const maxDepth = 15;
|
const maxDepth = 15;
|
||||||
|
|
||||||
while (parent && depth < maxDepth) {
|
while (parent && depth < maxDepth) {
|
||||||
const hasAvatar = parent.querySelector('img[alt*="profile picture"]');
|
const hasAvatar = parent.querySelector(this.AVATAR_SELECTORS);
|
||||||
const hasFollow = parent.querySelector('[role="button"]');
|
const hasFollow = parent.querySelector('[role="button"]');
|
||||||
|
|
||||||
if (hasAvatar && hasFollow && parent.children.length >= 2) {
|
if (hasAvatar && hasFollow && parent.children.length >= 2) {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "Reels Master",
|
"name": "Reels Master",
|
||||||
"version": "1.0.0",
|
"version": "1.1.2",
|
||||||
"description": "Instagram Reels volume control and download",
|
"description": "Enhance your Instagram experience with Reels Master - download reels, seek through videos, and more!",
|
||||||
"background": {
|
"background": {
|
||||||
"service_worker": "background/background.js"
|
"service_worker": "background/background.js"
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user