Last active
August 29, 2015 14:04
-
-
Save karthikeyann/ba6c5669057695529416 to your computer and use it in GitHub Desktop.
PDFJS sometimes does not load pdf becuase range requests are disable in proxy servers. This greasemonkey script automatically reloads the page disabling range using hashparams in url.
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
// ==UserScript== | |
// @name Firefox PDFJS | |
// @namespace poulet | |
// @include /^(http|https|file)://.*.pdf$/ | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
// NOTE: Reloads the PDF by disabling Range requests for some proxies. | |
// NOTE: Useful for Firefox PDFJS viewer for proxies without range requests (ex: proxy inside IIT Madras) | |
var url=window.location | |
var newurl= url + '#disableRange=true' | |
window.location = newurl; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment