mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-17 08:02:44 +00:00
Ctrl p is now hijacked on the edit and share page to auto open to the brews print page
This commit is contained in:
10
client/homebrew/pages/hijackPrint.js
Normal file
10
client/homebrew/pages/hijackPrint.js
Normal file
@@ -0,0 +1,10 @@
|
||||
module.exports = function(shareId){
|
||||
return function(event){
|
||||
event = event || window.event;
|
||||
if(event.ctrlKey && event.keyCode == 80){
|
||||
var win = window.open(`/homebrew/print/${shareId}?dialog=true`, '_blank');
|
||||
win.focus();
|
||||
event.preventDefault();
|
||||
}
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user