Last active
September 23, 2024 12:57
-
-
Save davidallenlewis/30cff8c91a3764db6aad92e9f2eb1d9a to your computer and use it in GitHub Desktop.
Patches for Pdf Viewer For WP Display Files version 1.0.5 by WePlugins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @PATCH for /wp-content/plugins/pdf-viewer-for-wpdf/assets/js/wpdf-pdf-viewer.js on line 16 | |
// Allows PDFs to render in higher resolution so they are not too blurry to read | |
//scale = 1, | |
scale = 3, | |
// @PATCH for /wp-content/plugins/pdf-viewer-for-wpdf/pdf-viewer-for-wpdf.php | |
// @HACK by David Lewis - add timestamp to URLs to prevent browser caching of same-named files | |
// Line 77 | |
//<li><a href="javascript:void(0);" class="display_pdf_file" data-pdf-url = '.$download_url.' ></a></li> | |
<li><a href="javascript:void(0);" class="display_pdf_file" data-pdf-url="'.$download_url. $url.'&time='.time().'"></a></li> | |
// Line 196 | |
// @HACK by David Lewis - add timestamp to URLs to prevent browser caching of same-named files | |
/* | |
$action_html.= '<div class="action_list_b"> | |
<a href="javascript:void(0);" class="render_pdf_btn" data-file-name="'. $shortcode->current_file_name.'" data-pdf-url ="'. $url.'"> </a> | |
</div> | |
'; | |
*/ | |
$action_html.= '<div class="action_list_b"><a href="javascript:void(0);" class="render_pdf_btn" data-file-name="'. $shortcode->current_file_name.'" data-pdf-url="'. $url.'&time='.time().'"></a></div>'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment