diff --git a/background.js b/background.js index 445d9ae..ca72c11 100644 --- a/background.js +++ b/background.js @@ -37,6 +37,10 @@ chrome.pageAction.onClicked.addListener(function(tab) { var filename = betterUrl.substr(betterUrl.lastIndexOf("/")); filename = cleanExtension(filename); + if(filename.indexOf('.') == -1) { + filename = filename + '.jpg'; //on average, it's probably JPEG if it doesn't have an extension + } + chrome.storage.sync.get({url: '', tabbehaviour: '', copytoclipboard: false, replacebookmark: false, disableblacklist: false}, function(config) { if(config.url == '') { alert("Please select a Pomf clone.");