Skip to content

Commit

Permalink
在popup页内 Enter键 查询选中部分
Browse files Browse the repository at this point in the history
  • Loading branch information
WayneXuan committed Jan 7, 2016
1 parent f018794 commit 7a47c24
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/javascript/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,4 +376,11 @@ toggleKey.onchange = function (event) {
// showDuration.addEventListener("onclick", function (event) {
// currentDuration.innerHTML = event.target.value;
// updateSetting("duration", event.target.value);
// })
// })

//在popup页内 Enter键 查询选中部分
document.addEventListener('keyup',function(e){
if(document.activeElement.tagName=="BODY" && e.which==13){
queryInPopup(window.getSelection().toString());
}
});

0 comments on commit 7a47c24

Please sign in to comment.