Fix bookmarking for gifv

This commit is contained in:
Les De Ridder 2016-01-18 16:40:47 +01:00
parent 757c92612c
commit 1f4c9dd10b
1 changed files with 3 additions and 3 deletions

View File

@ -31,8 +31,8 @@ function copyToClipboard(url) {
chrome.pageAction.onClicked.addListener(function(tab) { chrome.pageAction.onClicked.addListener(function(tab) {
getCurrentTabUrl(function(url) { getCurrentTabUrl(function(url) {
url = getBetterUrl(url); var betterUrl = getBetterUrl(url);
var filename = url.substr(url.lastIndexOf("/")); var filename = betterUrl.substr(betterUrl.lastIndexOf("/"));
chrome.storage.sync.get({url: '', tabbehaviour: '', copytoclipboard: false, replacebookmark: false}, function(config) { chrome.storage.sync.get({url: '', tabbehaviour: '', copytoclipboard: false, replacebookmark: false}, function(config) {
if(config.url == '') { if(config.url == '') {
@ -65,7 +65,7 @@ chrome.pageAction.onClicked.addListener(function(tab) {
replaceBookmark(url, newUrl); replaceBookmark(url, newUrl);
} }
}; };
worker.postMessage(JSON.stringify({pomfclone: config.url, url: url, filename: filename})); worker.postMessage(JSON.stringify({pomfclone: config.url, url: betterUrl, filename: filename}));
}); });
}); });
}); });