Pleased to meet you diplomatic code persimmon!

: Clippy, bash / zsh commands, CSS Color

Copy text from a website (w/ console)

list items text

Copies the inner Text of a list (ordered or unordered) to the clipboard, one item per line.

Select the <ul> or <ol> element in the inspector, then run the following code in the console:

copy(Array.from($0.querySelectorAll('li'), el => el.innerText).join('\r\n'));

Explainer: Selects all <li> elements of the selected parent ($0), converts it to an Array (Array.from()since the returned node list is map‚able), get the innerText of those elements via map, the second parameter of Array.from(), join the Array to a Line-by-line string-list (otherwise we would get an array markup), then copy everything to clipboard.

Adapt to your own needs, e.g replace 'li' with 'img' and el.innerText with el.src to get all image urls.

notes

👉 wrap code inside an IIFE in order to re-run it without an … alreay declared error:

(() => {
  // function here
})();

Workflow Links

Productivity

Sublime Text