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