Skip to content

Commit

Permalink
Merge pull request #74 from HuiiBuh/features
Browse files Browse the repository at this point in the history
Fixed the download (account class changed)
  • Loading branch information
HuiiBuh authored Feb 19, 2020
2 parents 3830741 + bf6d19d commit 3b7e0bc
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 47 deletions.
2 changes: 1 addition & 1 deletion firefox/js/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class Button {
parent = temp2[0];
}

let accountName = document.getElementsByClassName("FPmhX notranslate nJAzx")[0].innerText;
let accountName = document.getElementsByClassName(accountNameClass)[0].innerText;

let videoDownload = parent.getElementsByClassName(videoContentClass);
let imageDownload = parent.getElementsByClassName(imageContentClass);
Expand Down
5 changes: 4 additions & 1 deletion firefox/js/downloadHomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const homepagePictureClass = "FFVAD";
const homepageVideoClass = "tWeCl";
const homepageSliderClass = "_-1_m6";

const accountNameClass = "sqdOP yWX7d _8A5w5 ZIAjV ";

class DownloadHomePage {
constructor() {
this.buttons = [];
Expand Down Expand Up @@ -61,7 +63,8 @@ class DownloadHomePage {

let dlUrl = "";

let accountName = parent.getElementsByClassName("FPmhX notranslate nJAzx")[0].innerText;
let accountName = parent.getElementsByClassName(accountNameClass);
accountName = accountName[0].innerText;

let videoDownload = parent.getElementsByClassName(homepageVideoClass);
let imageDownload = parent.getElementsByClassName(homepagePictureClass);
Expand Down
2 changes: 1 addition & 1 deletion firefox/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ function showSnackbar(text) {
snackbar.className = "show";
setTimeout(function () {
snackbar.className = snackbar.className.replace("show", "");
}, 3000);
}, 5000);
}

/**
Expand Down
86 changes: 42 additions & 44 deletions firefox/manifest.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,44 @@
{
"manifest_version": 2,
"name": "Instagram Downloader",
"version": "2.2.6",
"icons": {
"48": "icons/instagram.png"
},
"web_accessible_resources": [
"icons/download.png",
"icons/download_multiple.png"
],
"permissions": [
"downloads"
],
"background": {
"scripts": [
"js/download.js",
"js/jszip-utils.min.js",
"js/jszip.min.js"
]
},
"content_scripts": [
{
"matches": [
"*://*.instagram.com/*"
],
"js": [
"js/button.js",
"js/hoverable.js",
"js/downloadAll.js",
"js/downloadHomePage.js",
"js/downloadStory.js",
"js/profilePicture.js",
"js/main.js"
],
"css": [
"css/main.css"
]
"manifest_version": 2,
"name": "Instagram Downloader",
"version": "2.2.7",
"icons": {
"48": "icons/instagram.png"
},
"web_accessible_resources": [
"icons/download.png",
"icons/download_multiple.png"
],
"permissions": [
"downloads"
],
"background": {
"scripts": [
"js/download.js",
"js/jszip-utils.min.js",
"js/jszip.min.js"
]
},
"content_scripts": [{
"matches": [
"*://*.instagram.com/*"
],
"js": [
"js/button.js",
"js/hoverable.js",
"js/downloadAll.js",
"js/downloadHomePage.js",
"js/downloadStory.js",
"js/profilePicture.js",
"js/main.js"
],
"css": [
"css/main.css"
]
}],
"applications": {
"gecko": {
"id": "[email protected]"
}
}
],
"applications": {
"gecko": {
"id": "[email protected]"
}
}
}
}

0 comments on commit 3b7e0bc

Please sign in to comment.