Skip to content

Commit

Permalink
Fix for "Add to history" functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
GrosPoulet committed Feb 13, 2022
1 parent bd893be commit 5ff674b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions js/hoverzoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -1296,10 +1296,7 @@ var hoverZoom = {
setTimeout(posImg, options.showWhileLoading ? 0 : 10);

if (options.addToHistory && !chrome.extension.inIncognitoContext) {
var url = hz.currentLink.attr('href') || imgDetails.url;
if (url.startsWith('/') && url.indexOf('http') < 0)
url = window.location.protocol + '//' + window.location.hostname + url;
chrome.runtime.sendMessage({action:'addUrlToHistory', url:url});
chrome.runtime.sendMessage({action:'addUrlToHistory', url:imgDetails.url});
}
}

Expand Down

0 comments on commit 5ff674b

Please sign in to comment.