From ecb6ac3df169732d1ebf47574a03cc366a6e99a3 Mon Sep 17 00:00:00 2001 From: Robert Pelletier Date: Fri, 13 Oct 2017 07:39:12 -0400 Subject: [PATCH 1/4] Added Print Button --- js/browser.js | 7 +++++-- windows/browser.html | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/js/browser.js b/js/browser.js index 7a7790b..cd49e5b 100644 --- a/js/browser.js +++ b/js/browser.js @@ -76,7 +76,7 @@ $(function(){ }); } //print on ctrl+p - if (allowPrint && e.which == 80 && e.ctrlKey){ + if (allowPrint && (e.which == 36 || e.which == 80 && e.ctrlKey)){ var activeBrowserID = $('#tabs a.active').attr('href'); $(activeBrowserID+' webview').get(0).print(); } @@ -93,7 +93,10 @@ $(function(){ var activeHomeURL = $webview.data('src'); $webview.attr('src', activeHomeURL); }); - + $('#nav .print').click(function(e){ + var activeBrowserID = $('#tabs a.active').attr('href'); + $(activeBrowserID+' webview').get(0).print(); + }); $('#nav .back').click(function(e){ if($('#nav .back').hasClass('inactive')){ return; diff --git a/windows/browser.html b/windows/browser.html index 97568e9..2e4e7d7 100644 --- a/windows/browser.html +++ b/windows/browser.html @@ -101,6 +101,7 @@