Skip to content

Commit

Permalink
Merge pull request #83 from HuiiBuh/features
Browse files Browse the repository at this point in the history
Version 3.0
  • Loading branch information
HuiiBuh authored Mar 29, 2020
2 parents b4fea9e + 8ab9165 commit c4673a0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
9 changes: 1 addition & 8 deletions .idea/workspace.xml

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

2 changes: 1 addition & 1 deletion firefox/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Instagram Downloader",
"version": "2.3",
"version": "3.0",
"icons": {
"512": "icons/instagram.png"
},
Expand Down
8 changes: 5 additions & 3 deletions firefox/ts/downloaders/StoryDownloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,18 @@ class StoryDownloader extends Downloader {
downloadButton.setAttribute('class', 'story-download-button');
settingsButton.appendChild(downloadButton);

const accountName = this.getAccountName(document.body, Variables.storyAccountName);
const accountName: string = this.getAccountName(document.body, Variables.storyAccountName);
downloadButton.onclick = this.downloadContent(accountName);
}

/**
* Download the correct content
* @param accountName The name of the account
*/
private downloadContent(accountName: string): () => void {
return () => {
private downloadContent(accountName: string): (event: MouseEvent) => void {
return (event: MouseEvent): void => {
event.stopPropagation();
event.preventDefault();
const video = document.getElementsByTagName('source')[0];
const img = document.getElementsByClassName(Variables.storyImageClass)[0] as HTMLImageElement;

Expand Down

0 comments on commit c4673a0

Please sign in to comment.