Skip to content

Commit

Permalink
Fixed a bug that dosen't unbind image tag's event hander.
Browse files Browse the repository at this point in the history
  • Loading branch information
monochromegane committed Dec 23, 2013
1 parent 677c2f2 commit 6f16e20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion popup/popup.js
Expand Up @@ -12,7 +12,7 @@ Page.prototype.load = function(){
var image = $(this); var image = $(this);
$.getJSON("http://www.lgtm.in/g?" + Math.random(), function (data) { $.getJSON("http://www.lgtm.in/g?" + Math.random(), function (data) {
image.attr("src", data.imageUrl); image.attr("src", data.imageUrl);
image.click(function(){ image.unbind().click(function(){
chrome.tabs.sendMessage(tabId, {image: "![LGTM](" + image.attr("src") + ")"}, function(response){}); chrome.tabs.sendMessage(tabId, {image: "![LGTM](" + image.attr("src") + ")"}, function(response){});


$(".message").show(500); $(".message").show(500);
Expand Down

0 comments on commit 6f16e20

Please sign in to comment.