diff options
-rw-r--r-- | default.revealjs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/default.revealjs b/default.revealjs index 51962e30d..69bccac8d 100644 --- a/default.revealjs +++ b/default.revealjs @@ -27,10 +27,19 @@ $endfor$ $else$ <link rel="stylesheet" href="$revealjs-url$/css/theme/simple.css" id="theme"> $endif$ - <link rel="stylesheet" media="print" href="$revealjs-url$/css/print/pdf.css" /> - <!--[if lt IE 9]> - <script src="$revealjs-url$/lib/js/html5shiv.js"></script> - <![endif]--> + <!-- If the query includes 'print-pdf', include the PDF print sheet --> + <script> + if( window.location.search.match( /print-pdf/gi ) ) { + var link = document.createElement( 'link' ); + link.rel = 'stylesheet'; + link.type = 'text/css'; + link.href = '$revealjs-url$/css/print/pdf.css'; + document.getElementsByTagName( 'head' )[0].appendChild( link ); + } + </script> + <!--[if lt IE 9]> + <script src="$revealjs-url$/lib/js/html5shiv.js"></script> + <![endif]--> $if(math)$ $math$ $endif$ |