Bump version to 1.1.2 and add support for multiple avatar selectors in content script
All checks were successful
Build and Release Extension / build (push) Successful in 18s
All checks were successful
Build and Release Extension / build (push) Successful in 18s
This commit is contained in:
parent
74a50ab8f6
commit
2361df7da9
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "reels-master",
|
"name": "reels-master",
|
||||||
"version": "1.1.1",
|
"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": {
|
||||||
|
|||||||
@ -218,6 +218,17 @@ class ReelsMaster {
|
|||||||
'フォローする',
|
'フォローする',
|
||||||
'关注',
|
'关注',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
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[] = [];
|
||||||
@ -508,7 +519,7 @@ class ReelsMaster {
|
|||||||
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,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "Reels Master",
|
"name": "Reels Master",
|
||||||
"version": "1.1.1",
|
"version": "1.1.2",
|
||||||
"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