Skip to content

Instantly share code, notes, and snippets.

View bsturdivan's full-sized avatar

Brian Sturdivan bsturdivan

View GitHub Profile
@greenido
greenido / export-html-table-to-csv.js
Created October 2, 2024 21:55
Export a html table to a CSV file (just put this code in Chrome devtools)
// Function to convert HTML table to array
function tableToArray(tableId) {
const table = document.getElementById(tableId);
const rows = table.getElementsByTagName('tr');
const result = [];
for (let i = 0; i < rows.length; i++) {
const row = [];
const cells = rows[i].getElementsByTagName('td');
const headerCells = rows[i].getElementsByTagName('th');
@jonraasch
jonraasch / jQuery.support-transition.js
Created April 21, 2010 14:32
Extends the jQuery.support object to CSS3 transition
// jQuery.support.transition
// to verify that CSS3 transition is supported (or any of its browser-specific implementations)
$.support.transition = (function(){
var thisBody = document.body || document.documentElement,
thisStyle = thisBody.style,
support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined;
return support;
})();