This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var form_id = 3; | |
// listen to all ajax completed events | |
jQuery(document).ajaxComplete(function (event, jqXHR, ajaxOptions) { | |
// try to parse response | |
var data = JSON.parse(jqXHR.responseText || '{}'); | |
// check if the ajax request is for our form | |
if (data.data.form_id == form_id) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* NodeJS beefree.io integration | |
*/ | |
const https = require('https'); | |
const querystring = require('querystring'); | |
/** | |
* Fetch access token from beefree api | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Convert PDFDocument to Base64 | |
*/ | |
const PDFDocument = require('pdfkit'); | |
const stream = require('./stream'); | |
// crate document and write stream | |
let doc = new PDFDocument(); | |
let writeStream = new stream.WritableBufferStream(); |
OlderNewer