Created
September 16, 2016 19:43
-
-
Save xinhaoyuan/4586ef0b2478f2bcf55a3df1a034bdda to your computer and use it in GitHub Desktop.
This file contains 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
// ==UserScript== | |
// @name RefreshPdf | |
// @namespace xinhaoyuan@gmail.com | |
// @description Refresh pdf in current view | |
// @include *.pdf* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
(function () { | |
document.addEventListener('keydown', function (e) { | |
// pressed ctrl-r | |
if (e.keyCode == 82 && e.ctrlKey) { | |
var curViewLink = document.getElementById('viewBookmark'); | |
window.location = curViewLink.href; | |
window.location.reload(); | |
} | |
}, false); | |
}) (); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment