Get assignments out to a tab-separated format.
目前為
// ==UserScript==
// @name AO3: TSV-Esque
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Get assignments out to a tab-separated format.
// @author You
// @match https://archiveofourown.org/collections/*/assignments?*
// @icon https://icons.duckduckgo.com/ip2/archiveofourown.org.ico
// @grant none
// @license MIT
// ==/UserScript==
// TODO: Learn more about async calls and pagination to get all of 'em at once.
var rows = document.getElementsByTagName("dt");
var whole = "";
for (var x = 0; x < rows.length; x++) {
var whomst = rows[x].textContent.trim();
var pieces = whomst.split("\n");
var msg = pieces[0].trim() + "\t" + pieces[5].trim();
whole = whole + msg + "\n";
}
var box = document.createElement("textarea");
box.innerHTML = whole;
document.getElementsByTagName("dd")[0].parentNode.appendChild(box);