Skip to content

Instantly share code, notes, and snippets.

@darkwater4213
Forked from nikhiljha/aops.user.js
Created May 24, 2020 00:33
Show Gist options
  • Save darkwater4213/31e8fb48beaf58307062f33e47b246b2 to your computer and use it in GitHub Desktop.
Save darkwater4213/31e8fb48beaf58307062f33e47b246b2 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