Skip to content

Commit

Permalink
Fix IGTV & Stories bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mittya committed Feb 24, 2020
1 parent 2624183 commit f2a6ec8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion chrome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

"name": "__MSG_extName__",
"description": "__MSG_extDesc__",
"version": "1.14.0",
"version": "1.15.0",

"browser_action": {
"default_icon": {
Expand Down
6 changes: 3 additions & 3 deletions chrome/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if (window.location.pathname === '/') {
}

/* Detail page */
if (window.location.pathname.match('/p/')) {
if (window.location.pathname.match('/p/') || window.location.pathname.match('/tv/')) {
var _box_detail = '';

/*
Expand Down Expand Up @@ -171,7 +171,7 @@ function findMedia(box, way) {
// Stories Video: video 'if' in front of the image
if (_parent.querySelector('video')) {
_url = _parent.querySelector('video > source').src;
_username = _parent.parents('section')[0].querySelector('.FPmhX').text;
_username = _parent.parents('section')[0].querySelector('.FPmhX').title;

addBtn(_parent, _url, _username);

Expand All @@ -181,7 +181,7 @@ function findMedia(box, way) {
// Stories Picture
if (_parent.querySelector('img')) {
_url = _parent.querySelector('img').src;
_username = _parent.parents('section')[0].querySelector('.FPmhX').text;
_username = _parent.parents('section')[0].querySelector('.FPmhX').title;

addBtn(_parent, _url, _username);

Expand Down
2 changes: 1 addition & 1 deletion firefox/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

"name": "Media Helper",
"description": "Easily download Instagram pictures and videos.",
"version": "1.14.0",
"version": "1.15.0",

"browser_action": {
"default_icon": {
Expand Down
6 changes: 3 additions & 3 deletions firefox/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if (window.location.pathname === '/') {
}

/* Detail page */
if (window.location.pathname.match('/p/')) {
if (window.location.pathname.match('/p/') || window.location.pathname.match('/tv/')) {
var _box_detail = '';

/*
Expand Down Expand Up @@ -171,7 +171,7 @@ function findMedia(box, way) {
// Stories Video: video 'if' in front of the image
if (_parent.querySelector('video')) {
_url = _parent.querySelector('video > source').src;
_username = _parent.parents('section')[0].querySelector('.FPmhX').text;
_username = _parent.parents('section')[0].querySelector('.FPmhX').title;

addBtn(_parent, _url, _username);

Expand All @@ -181,7 +181,7 @@ function findMedia(box, way) {
// Stories Picture
if (_parent.querySelector('img')) {
_url = _parent.querySelector('img').src;
_username = _parent.parents('section')[0].querySelector('.FPmhX').text;
_username = _parent.parents('section')[0].querySelector('.FPmhX').title;

addBtn(_parent, _url, _username);

Expand Down

0 comments on commit f2a6ec8

Please sign in to comment.