This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| playground:bang [2025/01/25 14:44] – created clara | playground:bang [2025/01/26 16:51] (current) – wgp | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | hello | + | < |
| + | < | ||
| + | function fetch_request(url, | ||
| + | // fetching the pad | ||
| + | fetch(`${url}`, | ||
| + | ' | ||
| + | ' | ||
| + | }) | ||
| + | .then(response => response.text() ) | ||
| + | .then(css => inject_css(css) ); | ||
| + | } | ||
| + | function inject_css(css){ | ||
| + | console.log(' | ||
| + | let el = document.createElement(' | ||
| + | el.id = " | ||
| + | el.innerText = css; | ||
| + | document.head.appendChild(el); | ||
| + | }; | ||
| + | fetch_request("/ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | |||
| + | {{playground: | ||
| + | |||