Navigation überspringen

Harald Markus Wirth


Seiteninhalt:

Retreive CSS from browsers's memory

I changed a file on the wrong computer, and my CSS was gone. If you still have the page open in your browser, you can't just "save as", because it will likely download the wrong version and your code is finally gone.

Don't reload the page!

Instead extract the styles from your Dev-Console:

function live_extract_css() {
	[...document.styleSheets].forEach(s => {
		const styles = [...s.cssRules].reduce((a, c) => a += c.cssText + '\n', '')
		console.groupCollapsed('File: ' + String(s.href));
		console.log(styles);
		console.groupEnd();
	});
}


Content Management:

μCMS α1.6