Skip to content

Instantly share code, notes, and snippets.

@sumeshkp18
Created October 22, 2019 12:04
Show Gist options
  • Save sumeshkp18/3347846b82a4e4985969456ad95a5335 to your computer and use it in GitHub Desktop.
Save sumeshkp18/3347846b82a4e4985969456ad95a5335 to your computer and use it in GitHub Desktop.
<script>
$(document).ready(function () {
var $anchor = $('a');
$anchor.each(function () {
var href = $(this).attr('href');
if (href) {
if (href.indexOf('.pdf#page=') > -1) {
var newhref = href.replace('.pdf#page=', '.pdf#page');
$(this).attr('href', newhref);
}
}
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment