Sha256: 0c41e7c14ffeff538d867fd4fd51af8517a1f0d803898e40a5b0a2816d96ebed
Contents?: true
Size: 680 Bytes
Versions: 176
Compression:
Stored size: 680 Bytes
Contents
// // When a .print_pdf link is clicked, use its data-target attribute with // http://printjs.crabbly.com/ to print the PDF. This, without leaving the current page, // will bring up the print dialog. IE 11/Edge not supported however. // $(document).ready(function() { $(".print-pdf").on("click", function(e) { // detect IE8 and above, and edge if (document.documentMode || /Edge/.test(navigator.userAgent)) { // Revert to the default behaviour of showing the PDF in a new tab and the user // must print manually. } else { var url = $(this).data("target"); if (url) { e.preventDefault(); printJS(url); } } }); });
Version data entries
176 entries across 176 versions & 1 rubygems