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
window.Echo = new Echo({ | |
broadcaster: 'pusher', | |
key: process.env.MIX_PUSHER_APP_KEY, | |
wsHost: window.location.host, | |
wsPort: 80, | |
wssPort: 443, | |
disableStats: true, | |
enabledTransports: ['ws', 'wss'], | |
cluster: process.env.MIX_PUSHER_APP_CLUSTER, | |
}); |
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 exportTableToCSV($table, filename) { | |
var $headers = $table.find('tr:has(th)') | |
,$rows = $table.find('tr:has(td)') | |
// Temporary delimiter characters unlikely to be typed by keyboard | |
// This is to avoid accidentally splitting the actual contents | |
,tmpColDelim = String.fromCharCode(11) // vertical tab character | |
,tmpRowDelim = String.fromCharCode(0) // null character | |
// actual delimiter characters for CSV format |
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
<!DOCTYPE html> | |
<!-- | |
Created using multiple answers from StackOverFlow. Will only support modern browsers. | |
StackOverFlow answers: | |
http://stackoverflow.com/a/30566157/4485147 | |
http://stackoverflow.com/a/2044793/4485147 | |
--> |