Automatic "Attach Snapshot of Current Page"
I'm looking at modifying a translator, and want it to automatically attach a snapshot of the html page. The translator is for the Canadian Legal Information Institute, canlii.org. Right now it will automatically download the linked PDF file using the following:
but it would be much more useful (for my purposes, in any case) to get a snapshot of the HTML page instead of the PDF.
I looked through the various documentation on translators, but couldn't figure out how to do this. Any suggestions on what would do this?
Thanks
var pdfRe = /^(.+)\.html$/;
var pdfMatch = pdfRe.exec(doc.location.href);
if (pdfMatch) {
var pdfUrl = pdfMatch[1]+".pdf";
newItem.attachments = [{url:pdfUrl, title:"PDF version", mimeType:"application/pdf"}];
but it would be much more useful (for my purposes, in any case) to get a snapshot of the HTML page instead of the PDF.
I looked through the various documentation on translators, but couldn't figure out how to do this. Any suggestions on what would do this?
Thanks
2) Rather than looking through documentation, just look at existing translators. In this case, searching for "snapshot" would yield many examples. See, e.g., the NYT translator.