Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
fixed #52
Browse files Browse the repository at this point in the history
Fixed for users avatars who are having private account
  • Loading branch information
pishangujeniya committed Dec 13, 2021
1 parent 52fddc5 commit a4bffa9
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions InstagramHelperDataViewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ <h2>InstagramHelper Data Json File</h2>

<script type="text/javascript">

let avatarPlaceholder = "https://cdn.business2community.com/wp-content/uploads/2017/08/blank-profile-picture-973460_640.png";
let onErrorPlaceholderHtml = "this.src='" + avatarPlaceholder + "'";
let chatMessagesDiv = document.getElementById("chatMessages");

var allPossibleItemTypes = [
Expand Down Expand Up @@ -131,13 +133,13 @@ <h2>InstagramHelper Data Json File</h2>
return singleUserChatParticipant["profile_pic_url"];
}
}
return "https://cdn.business2community.com/wp-content/uploads/2017/08/blank-profile-picture-973460_640.png";
return avatarPlaceholder;
}

function myTextChatBoxGenerator(avatarImgSrc, text, timestamp) {
let chatTime = new Date(timestamp / 1000).toLocaleString();
let chatBox = '<div class="container darker">' +
'<img src="' + avatarImgSrc + '" alt="Avatar" class="right" style="width:100%;">' +
'<img src="' + avatarImgSrc + '" onerror="' + onErrorPlaceholderHtml + '" alt="Avatar" class="right" style="width:100%;">' +
'<p>' + text + '</p>' +
'<span class="time-left">' + chatTime + '</span>' +
'</div>';
Expand All @@ -147,7 +149,7 @@ <h2>InstagramHelper Data Json File</h2>
function otherTextChatBoxGenerator(avatarImgSrc, text, timestamp) {
let chatTime = new Date(timestamp / 1000).toLocaleString();
let chatBox = '<div class="container">' +
'<img src="' + avatarImgSrc + '" alt="Avatar" style="width:100%;">' +
'<img src="' + avatarImgSrc + '" onerror="' + onErrorPlaceholderHtml + '" alt="Avatar" style="width:100%;">' +
'<p>' + text + '</p>' +
'<span class="time-right">' + chatTime + '</span>' +
'</div>';
Expand All @@ -157,7 +159,7 @@ <h2>InstagramHelper Data Json File</h2>
function myLinkChatBoxGenerator(avatarImgSrc, link_url, link_text, timestamp) {
let chatTime = new Date(timestamp / 1000).toLocaleString();
let chatBox = '<div class="container darker">' +
'<img src="' + avatarImgSrc + '" alt="Avatar" class="right" style="width:100%;">' +
'<img src="' + avatarImgSrc + '" onerror="' + onErrorPlaceholderHtml + '" alt="Avatar" class="right" style="width:100%;">' +
'<p><a href=' + link_url + ' target="_blank">' + link_text + '</a></p>' +
'<span class="time-left">' + chatTime + '</span>' +
'</div>';
Expand All @@ -167,7 +169,7 @@ <h2>InstagramHelper Data Json File</h2>
function otherLinkChatBoxGenerator(avatarImgSrc, link_url, link_text, timestamp) {
let chatTime = new Date(timestamp / 1000).toLocaleString();
let chatBox = '<div class="container">' +
'<img src="' + avatarImgSrc + '" alt="Avatar" style="width:100%;">' +
'<img src="' + avatarImgSrc + '" onerror="' + onErrorPlaceholderHtml + '" alt="Avatar" style="width:100%;">' +
'<p><a href=' + link_url + ' target="_blank">' + link_text + '</a></p>' +
'<span class="time-right">' + chatTime + '</span>' +
'</div>';
Expand All @@ -178,7 +180,7 @@ <h2>InstagramHelper Data Json File</h2>
let chatTime = new Date(timestamp / 1000).toLocaleString();
let link_url = "https://instagram.com/p/" + mediaCode;
let chatBox = '<div class="container darker">' +
'<img src="' + avatarImgSrc + '" alt="Avatar" class="right" style="width:100%;">' +
'<img src="' + avatarImgSrc + '" onerror="' + onErrorPlaceholderHtml + '" alt="Avatar" class="right" style="width:100%;">' +
'<p> Post By <a href=' + link_url + ' target="_blank" >' + mediaUserName + '</a></p>' +
'<span class="time-left">' + chatTime + '</span>' +
'</div>';
Expand All @@ -189,7 +191,7 @@ <h2>InstagramHelper Data Json File</h2>
let chatTime = new Date(timestamp / 1000).toLocaleString();
let link_url = "https://instagram.com/p/" + mediaCode;
let chatBox = '<div class="container">' +
'<img src="' + avatarImgSrc + '" alt="Avatar" style="width:100%;">' +
'<img src="' + avatarImgSrc + '" onerror="' + onErrorPlaceholderHtml + '" alt="Avatar" style="width:100%;">' +
'<p> Post By <a href=' + link_url + ' target="_blank" >' + mediaUserName + '</a></p>' +
'<span class="time-right">' + chatTime + '</span>' +
'</div>';
Expand All @@ -200,7 +202,7 @@ <h2>InstagramHelper Data Json File</h2>
let chatTime = new Date(timestamp / 1000).toLocaleString();
let link_url = "https://instagram.com/p/" + clipCode;
let chatBox = '<div class="container darker">' +
'<img src="' + avatarImgSrc + '" alt="Avatar" class="right" style="width:100%;">' +
'<img src="' + avatarImgSrc + '" onerror="' + onErrorPlaceholderHtml + '" alt="Avatar" class="right" style="width:100%;">' +
'<p> Clip By <a href=' + link_url + ' target="_blank" >' + clipUsername + '</a></p>' +
'<span class="time-left">' + chatTime + '</span>' +
'</div>';
Expand All @@ -211,7 +213,7 @@ <h2>InstagramHelper Data Json File</h2>
let chatTime = new Date(timestamp / 1000).toLocaleString();
let link_url = "https://instagram.com/p/" + clipCode;
let chatBox = '<div class="container">' +
'<img src="' + avatarImgSrc + '" alt="Avatar" style="width:100%;">' +
'<img src="' + avatarImgSrc + '" onerror="' + onErrorPlaceholderHtml + '" alt="Avatar" style="width:100%;">' +
'<p> Clip By <a href=' + link_url + ' target="_blank" >' + clipUsername + '</a></p>' +
'<span class="time-right">' + chatTime + '</span>' +
'</div>';
Expand All @@ -221,7 +223,7 @@ <h2>InstagramHelper Data Json File</h2>
function myMediaChatBoxGenerator(avatarImgSrc, timestamp) {
let chatTime = new Date(timestamp / 1000).toLocaleString();
let chatBox = '<div class="container darker">' +
'<img src="' + avatarImgSrc + '" alt="Avatar" class="right" style="width:100%;">' +
'<img src="' + avatarImgSrc + '" onerror="' + onErrorPlaceholderHtml + '" alt="Avatar" class="right" style="width:100%;">' +
'<p>---PRIVATE MEDIA SHARED---</p>' +
'<span class="time-left">' + chatTime + '</span>' +
'</div>';
Expand All @@ -231,7 +233,7 @@ <h2>InstagramHelper Data Json File</h2>
function otherMediaChatBoxGenerator(avatarImgSrc, timestamp) {
let chatTime = new Date(timestamp / 1000).toLocaleString();
let chatBox = '<div class="container">' +
'<img src="' + avatarImgSrc + '" alt="Avatar" style="width:100%;">' +
'<img src="' + avatarImgSrc + '" onerror="' + onErrorPlaceholderHtml + '" alt="Avatar" style="width:100%;">' +
'<p>---PRIVATE MEDIA SHARED---</p>' +
'<span class="time-right">' + chatTime + '</span>' +
'</div>';
Expand Down

0 comments on commit a4bffa9

Please sign in to comment.