0
0
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:
Scott Tolksdorf
2016-05-24 22:09:51 -04:00
parent dce3f224c7
commit 56bb0e0ad8
3 changed files with 270 additions and 246 deletions

View 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();
}
};
};