Created
October 31, 2019 15:53
-
-
Save PedroHLC/0ae3a0f5bff8b0d6d20b232352be0a37 to your computer and use it in GitHub Desktop.
In AVA, redirects to real PDF instread of embedding it.
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 AVA redirect to PDF | |
// @namespace http://pedrohlc.com/ | |
// @version 0.1 | |
// @description AVA inpdf sucks! | |
// @author PedroHLC | |
// @match https://ava.ead.ufscar.br/mod/resource/view.php?id=* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var resource = document.getElementById("resourceobject"); | |
if(resource.type === "application/pdf") window.location = resource.data; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment