printThis Google Map Test

PrintThis 1.10.0 to test IE KB4021558

by celohc

HTML

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDA-EZF60n9DJ8SRhR2GnkXNESI0lOvU48&amp;language=en-GB"></script>
<button id="btn-directions" data-toggle="modal" data-target=".directions-modal">Get Directions</button>

<div id="printSection" class="modal fade directions-modal" tabindex="-1" role="dialog" aria-labelledby="modal_b4_directions" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div id="directions-modal-map" style="height:400px;"></div>

      <div id="container-fluid">
        <div class="row bg-light-grey text-center">
          <h2 class="mb20">Directions</h2>
        </div>

        <div class="row">
          <div class="col-xs-8 col-xs-offset-2">
            <div class="panel panel-danger mb0 mt20 hidden text-center" id="directions-error">
              <div class="panel-heading">
                <h3 class="panel-title">We're sorry, but something went wrong.</h3>
              </div>
              <div class="panel-body">
                Google Maps could not find the place you searched for.
              </div>
            </div>
          </div>
        </div>

        <div class="row text-center non-printable" id="directions-form">
          <div class="col-xs-6 col-xs-offset-3">
            <form role="form">
              <div class="form-group has-feedback" id="container-direction-form">

                <button class="btn btn-lg btn-primary col-full mt20" id="get_directions">Get Directions</button>
                <button class="btn btn-lg button-okay col-full mt20 hidden" id="print_directions"><span class="glyphicon glyphicon-print"></span> Print Map</button>
            </form>
     ...

JavaScript

/*
 * printThis v1.10.0
 * @desc Printing plug-in for jQuery
 * @author Jason Day
 *
 * Resources (based on):
 *              jPrintArea: http://plugins.jquery.com/project/jPrintArea
 *              jqPrint: https://github.com/permanenttourist/jquery.jqprint
 *              Ben Nadal: http://www.bennadel.com/blog/1591-Ask-Ben-Print-Part-Of-A-Web-Page-With-jQuery.htm
 *
 * Licensed under the MIT licence:
 *              http://www.opensource.org/licenses/mit-license.php
 *
 * (c) Jason Day 2015
 *
 * Usage:
 *
 *  $("#mySelector").printThis({
 *      debug: false,               // show the iframe for debugging
 *      importCSS: true,            // import page CSS
 *      importStyle: false,         // import style tags
 *      printContainer: true,       // grab outer container as well as the contents of the selector
 *      loadCSS: "path/to/my.css",  // path to additional css file - us an array [] for multiple
 *      pageTitle: "",              // add title to print page
 *      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
 *      canvas: false,              // copy canvas elements (experimental)
 *      doctypeString: '...',       // enter a different doctype for older markup
 *      removeScripts: false        // remove script tags from print content
 *  });
 *
 * Notes:
 *  - the loadCSS will load additional css (with or without @media print) into the iframe, adjusting layout
 */
;
(function($) {

    function appendContent($el, content) {
        if (!content) return;

        // Simple test for a jQuery element
        $el.append(content.jquery ? content.clone() : content);
    }

    function...