Skip to content

Instantly share code, notes, and snippets.

@PedroHLC
Created October 31, 2019 15:53
Show Gist options
  • Save PedroHLC/0ae3a0f5bff8b0d6d20b232352be0a37 to your computer and use it in GitHub Desktop.
Save PedroHLC/0ae3a0f5bff8b0d6d20b232352be0a37 to your computer and use it in GitHub Desktop.
In AVA, redirects to real PDF instread of embedding it.
// ==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