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
This is an old discussion that has not been active in a long time. Instead of commenting here, you should start a new discussion. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
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.