Skip to content

Instantly share code, notes, and snippets.

@djcowan
Created March 8, 2023 22:22
Show Gist options
  • Save djcowan/6d4cf975ed1b9233118ed9c5abdf8725 to your computer and use it in GitHub Desktop.
Save djcowan/6d4cf975ed1b9233118ed9c5abdf8725 to your computer and use it in GitHub Desktop.
/*
* @see: <https://blog.coupler.io/importhtml-function-google-sheets/>
*/
// Tables
var index = 1; [].forEach.call(document.getElementsByTagName("table"), function(elements) { console.log("Index: " + index++, elements); });
// Lists
var index = 1; [].forEach.call(document.querySelectorAll("ul,ol"), function(elements) { console.log("Index: " + index++, elements); });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment