This file contains hidden or 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
const fs = require('fs'); | |
// TODO LIST OF CUSTOM FONTS - ADD NEW FONTS TO IT IF NEEDED | |
const CUSTOM_FONTS_SPECS = [ | |
{ | |
name: 'Open Sans', | |
weights: ['300','300i','400','400i','600','600i','700','700i','800','800i'], | |
defaultWeight: '400', | |
}, | |
{ |
This file contains hidden or 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
function isElement(addedNode, selector, callback) { | |
if (typeof addedNode.querySelector === 'function' && addedNode.querySelector(selector)) { | |
callback(); | |
} | |
} | |
var elementReadyObserver = new MutationObserver(function (mutations) { | |
for (var i=0, numMutations=mutations.length; i<numMutations; i++) { | |
for (var j=0, numNodes=mutations[i].addedNodes.length; j<numNodes; j++) { | |
isElement(mutations[i].addedNodes[j], '#YOUR-CSS-SELECTOR > .OF-THE-ELEMENT.TO-OBSERVE', function() { |
This file contains hidden or 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
// Install dependencies | |
// npm i -s node-fetch csv-writer csvtojson | |
const fetch = require('node-fetch'); | |
const csvToJson = require('csvtojson'); | |
const createCsvWriter = require('csv-writer').createObjectCsvWriter; | |
function lookup(phonenumber) { | |
const sid = '__YOUR_TWILIO_SID__'; | |
const token = '__YOUR_TWILIO_AUTH_TOKEN__'; |