Skip to content

Instantly share code, notes, and snippets.

@nikhiljha
Created October 4, 2016 02:16
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nikhiljha/eebbabde3978c8af5894939b0d517169 to your computer and use it in GitHub Desktop.
Save nikhiljha/eebbabde3978c8af5894939b0d517169 to your computer and use it in GitHub Desktop.
AoPS Downloader
// ==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