Created
October 4, 2016 02:16
-
-
Save nikhiljha/eebbabde3978c8af5894939b0d517169 to your computer and use it in GitHub Desktop.
AoPS Downloader
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 AoPS Downloader | |
// @namespace http://www.artofproblemsolving.com/ | |
// @version 0.0.1 | |
// @description Download the AoPS WOOT (or other classes) transcripts! | |
// @author Nikhil Jha | |
// @match http://www.artofproblemsolving.com/class/*/transcript/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var elHtml = document.getElementsByClassName('transcript')[0].innerHTML; | |
var link = document.createElement('a'); | |
link.setAttribute('download', 'transcript.html'); | |
link.setAttribute('href', 'data:' + 'text/html' + ';charset=utf-8,' + encodeURIComponent(elHtml)); | |
link.click(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment