Bump version to 1.1.1 and add support for multiple follow button text locales
All checks were successful
Build and Release Extension / build (push) Successful in 17s
All checks were successful
Build and Release Extension / build (push) Successful in 17s
This commit is contained in:
parent
0cf53e8fe0
commit
74a50ab8f6
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "reels-master",
|
"name": "reels-master",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"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": {
|
||||||
|
|||||||
@ -199,6 +199,26 @@ class ReelsMaster {
|
|||||||
'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 findAllActionContainers(): HTMLElement[] {
|
private findAllActionContainers(): HTMLElement[] {
|
||||||
const containers: HTMLElement[] = [];
|
const containers: HTMLElement[] = [];
|
||||||
|
|
||||||
@ -481,7 +501,8 @@ 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;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "Reels Master",
|
"name": "Reels Master",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "Enhance your Instagram experience with Reels Master - download reels, seek through videos, and more!",
|
"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