From 3bd315a277aa76c6cc8d73df95544da349888833 Mon Sep 17 00:00:00 2001 From: Mu-An Chiou Date: Mon, 9 Dec 2013 14:17:27 +0100 Subject: [PATCH] Wrong var name, fix shift+G couldn't be triggered twice --- manifest.json | 2 +- src/inject/inject.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index c219217..7051668 100755 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "GitHub Notification Helper for Gmail", - "version": "0.0.5", + "version": "0.0.6", "manifest_version": 2, "description": "Add links to GitHub threads and shortcuts to your Gmail interface.", "homepage_url": "http://github-gmail.muan.co", diff --git a/src/inject/inject.js b/src/inject/inject.js index d8ec08d..ffe53e6 100755 --- a/src/inject/inject.js +++ b/src/inject/inject.js @@ -16,6 +16,7 @@ $(window).on('hashchange', function() { }) $(document).on("keypress", function(event) { + // Shortcut: bind shift + G, if a button exist and event not in a textarea if( event.shiftKey && event.keyCode == 71 && window.idled && $(".github-link:visible")[0] && notAnInput(event.target)) { triggerGitHubLink() @@ -35,7 +36,7 @@ function triggerGitHubLink () { window.idled = false $(".github-link:visible")[0].dispatchEvent(fakeClick()) - setTimeout( function(){ window.clicked = true }, 1000) + setTimeout( function(){ window.idled = true }, 1000) } // Go to selected email GitHub thread