Skip to content

Commit

Permalink
Merge pull request #91 from jasonday/footer
Browse files Browse the repository at this point in the history
1.8.0 - Added "footers"
  • Loading branch information
oculus42 authored Jan 16, 2017
2 parents 3b7007e + 60bc9d7 commit 2693bb1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
6 changes: 5 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
10/15/2017 Added quoting around values to correct behavior of complex values
01/16/2017 Added footer as proposed in 2015 by @RomainGehrig
Bumped version to 1.8.0 for new feature
Corrected 1.7.1 changelog date to 01/15/2017

01/15/2017 Added quoting around values to correct behavior of complex values
Bumped to 1.7.1

12/14/2016 Added support for arbitrary BASE urls.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "print-this",
"version": "1.7.1",
"version": "1.8.0",
"description": "Printing plug-in for jQuery",
"main": "printThis.js",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion printThis.jquery.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "printThis",
"version": "1.7.1",
"version": "1.8.0",
"title": "printThis",
"description": "Printing plug-in for jQuery. Print specific page elements, add print options, maintain or add new styling using jQuery.",
"author": {
Expand Down
7 changes: 6 additions & 1 deletion printThis.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* printThis v1.7.1
* printThis v1.8.0
* @desc Printing plug-in for jQuery
* @author Jason Day
*
Expand All @@ -25,6 +25,7 @@
* removeInline: false, * remove all inline styles from print elements
* printDelay: 333, * variable print delay
* header: null, * prefix to html
* footer: null, * postfix to html
* base: false, * preserve the BASE tag, or accept a string for the URL
* formValues: true * preserve input/form values
* });
Expand Down Expand Up @@ -206,6 +207,9 @@
}
}

// print "footer"
if (opt.footer) $body.append(opt.footer);

setTimeout(function() {
if ($iframe.hasClass("MSIE")) {
// check if the iframe was created with the ugly hack
Expand Down Expand Up @@ -246,6 +250,7 @@
removeInline: false, // remove all inline styles
printDelay: 333, // variable print delay
header: null, // prefix to html
footer: null, // postfix to html
formValues: true, // preserve input/form values
base: false, // preserve the BASE tag, or accept a string for the URL
doctypeString: '<!DOCTYPE html>' // html doctype
Expand Down

0 comments on commit 2693bb1

Please sign in to comment.