Skip to content

Commit

Permalink
Merge pull request #309 from kmbarr/minor/bugfix-300
Browse files Browse the repository at this point in the history
  • Loading branch information
HuiiBuh authored Jun 16, 2022
2 parents 591761f + 7852448 commit ed5ad69
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 13 deletions.
14 changes: 14 additions & 0 deletions docs/_includes/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@
# Looking for a new maintainer or buyer
Hi, I am looking for a new maintainer, because I do not use IG and I do not find any pleasure in developing this extension any more. If you want to maintain this extension please contact me.

### Version 4.6.3

`11.06.2022`

#### Fixes

+ Fixed some issues with image download not showing up

#### Known Issues

+ Unable to download some videos due to change in IG format

---

### Version 4.6.2

`02.06.2022`
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "instagram_downloader",
"version": "4.5.3",
"version": "4.6.3",
"description": "Browser extension which downloads images and videos from instagram",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/manifest_chrome.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "IG Downloader",
"description": "Open Source und privacy conscious Instagram Downloader, which downloads images, videos, Instagram stories and IGTV.",
"version": "4.6.2",
"version": "4.6.3",
"icons": {
"512": "icons/instagram.png"
},
Expand Down
2 changes: 1 addition & 1 deletion src/manifest_firefox.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "IG Downloader",
"version": "4.6.2",
"version": "4.6.3",
"icons": {
"512": "icons/instagram.png"
},
Expand Down
2 changes: 1 addition & 1 deletion src/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@


// Hover over account to display the download button
.RR-M-:hover, .M-jxE:hover, ._aarf._aarg:hover {
.RR-M-:hover, .M-jxE:hover, ._aarf._aarg:hover, ._aa_j ._aarf:hover {
.account-download-button {
opacity: 1;
visibility: visible;
Expand Down
9 changes: 5 additions & 4 deletions src/ts/QuerySelectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,23 @@

export enum QuerySelectors {
// Post
postWrapper = '.M9sTE, .NI8nC, article._aalr, article._aa6a, article._aatb',
postWrapper = '.M9sTE, .NI8nC, article._aalr, article._aa6a, article._aatb, article._ab0-, article._ab6k',
postBookmark = '.wmtNn, ._aamz > div',
postSliderBubble = '.JSZAJ, .ijCUd, ._acnb',
postAccountName = "._aacl > ._aap6 >.oajrlxb2",
postSliderBubbleActive = '.XCodT, ._acnb._acnf',
sliderItem = "._acaz",
postContentWrapper = "._aatk._aatl, ._aatk._aatn, ._aato._ab1k._ab1l",
postContentWrapper = "._aatk._aatl, ._aatk._aatn, ._aato._ab1k._ab1l, ._aagu._ab64 ._aagv",

// Story
storyImage = '.y-yJ5, img._aa63',
storyCloseButton = '.K_10X, ._g3zU, .aUIsh, ._ac0g>._abl-',
storyAccountName = '._a3gq ._ac0q a',

// Account, Hover, Explore, Reels
accountImage = '._aarf._aarg ._aa8j',
accountImage = '._aarf._aarg ._aa8j, ._aa_j ._aarf ._aa8h ._aa8j',
accountName = '._7UhW9.fKFbl.yUEEX.KV-D4.fDxYl, ._aacl._aacs._aact._aacx._aada',

// Account Image
accountImageWrapper = '.RR-M-, .M-jxE, ._aarf._aarg',
accountImageWrapper = '.RR-M-, .M-jxE, ._aarf._aarg, ._aarf ._aa8h',
}
6 changes: 3 additions & 3 deletions src/ts/downloaders/PostDownloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ export class PostDownloader extends Downloader {
}

private static async downloadWithOutSlider(element: HTMLElement): Promise<void> {
const postContentWrapper = document.querySelector(QuerySelectors.postContentWrapper);
const postContentWrapper = element.querySelector(QuerySelectors.postContentWrapper)
|| document.querySelector(QuerySelectors.postContentWrapper);
const img = postContentWrapper?.querySelector?.('img');
const video = postContentWrapper?.querySelector?.('video');

Expand Down Expand Up @@ -179,8 +180,7 @@ export class PostDownloader extends Downloader {
const bookmarkElement: HTMLElement = element.querySelector(QuerySelectors.postBookmark) as HTMLElement;
const downloadButton: HTMLElement = document.createElement('span');
downloadButton.classList.add('post-download-button');
bookmarkElement.appendChild(downloadButton);

downloadButton.onclick = () => PostDownloader.downloadContent(element);
bookmarkElement?.appendChild(downloadButton);
}
}
4 changes: 3 additions & 1 deletion src/ts/downloaders/StoryDownloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ export class StoryDownloader extends Downloader {
url = extractSrcSet(img);
}

const storyAccountName = (document.querySelector(QuerySelectors.storyAccountName) as HTMLElement | null)?.innerText || 'unknown';

const downloadMessage: DownloadMessage = {
imageURL: [url],
accountName: 'unknown',
accountName: storyAccountName,
type: DownloadType.single,
};
await browser.runtime.sendMessage(downloadMessage);
Expand Down

0 comments on commit ed5ad69

Please sign in to comment.