Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » advanced hahas
- kkidslogin
-
Scratcher
1000+ posts
advanced hahas
(#240)I mean, it works
How I debug codeprint("Here") ... print("Here1") ... print("Here2") ... print("Here3")
- Mr_rudy
-
Scratcher
100+ posts
advanced hahas
01110111 01101000 01100001 01110100 00100000 01100100 01101001 01100100 00100000 00110000 00100000 01110011 01100001 01111001 00100000 01110100 01101111 00100000 00111000 00101100 00100000 01101110 01101001 01100011 01100101 00100000 01100010 01100101 01101100 01110100
decode that
decode that

- ninjaMAR
-
Scratcher
1000+ posts
advanced hahas
(#243)what did 0 say to 8, nice belt
01110111 01101000 01100001 01110100 00100000 01100100 01101001 01100100 00100000 00110000 00100000 01110011 01100001 01111001 00100000 01110100 01101111 00100000 00111000 00101100 00100000 01101110 01101001 01100011 01100101 00100000 01100010 01100101 01101100 01110100
decode that
- TheNintendoFan2020
-
Scratcher
1000+ posts
advanced hahas
Do you (Nintendo 64's Micro processor name but the last letter is gone and the first letter is replaced with d) your Nachos or eat them without (Nintendo 64's Micro processor name but the last letter is gone and the first letter is replaced with d)ping
- INSERT-USER_NAME
-
Scratcher
1000+ posts
advanced hahas
i wrote an html editor
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>html editor</title> </head> <body> <textarea id="htmlIn">html go here</textarea> <div id="htmlrend"></div> <script> var txtBox = document.getElementById("htmlIn"); var htmlDiv = document.getElementById("htmlrend"); var rendHtml = function(e) { htmlDiv.innerHTML = txtBox.value }; addEventListener("keydown", rendHtml); </script> </body> </html>
Last edited by INSERT-USER_NAME (May 15, 2024 13:37:52)
- BigNate469
-
Scratcher
1000+ posts
advanced hahas
i wrote an html editorI mean, it works, but a couple of tips:<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>html editor</title> </head> <body> <textarea id="htmlIn">html go here</textarea> <div id="htmlrend"></div> <script> var txtBox = document.getElementById("htmlIn"); var htmlDiv = document.getElementById("htmlrend"); var rendHtml = function(e) { htmlDiv.innerHTML = txtBox.value }; addEventListener("keydown", rendHtml); </script> </body> </html>
let is more stable than var, but does not have support in systems running ES5 or earlier.
<textarea>s already render the text inside of them…
Also, how is this a joke?
your JavaScript may need debugging
- INSERT-USER_NAME
-
Scratcher
1000+ posts
advanced hahas
<textarea>s already render the text inside of them…the function “htmlRend” is for tossing whatever is typed in the textarea into the htmlDiv's innerHTML so it makes some sort of live preview
It lags behind one key press for some reason, i'm not sure why, or how to get around this but pressing shift could be a workaround for the end-user
Also, how is this a joke?I found it funny how extremely simple it was to make
- BigNate469
-
Scratcher
1000+ posts
advanced hahas
Also, you might want to use .innerText or .textContent, because .innerHTML is susceptible to someone writing<textarea>s already render the text inside of them…the function “htmlRend” is for tossing whatever is typed in the textarea into the htmlDiv's innerHTML so it makes some sort of live preview
It lags behind one key press for some reason, i'm not sure why, or how to get around this but pressing shift could be a workaround for the end-userAlso, how is this a joke?I found it funny how extremely simple it was to make
<script>//Insert malicious JavaScript here</script>
- INSERT-USER_NAME
-
Scratcher
1000+ posts
advanced hahas
it's really meant to be an overly simple html editor, not a text editorAlso, you might want to use .innerText or .textContent, because .innerHTML is susceptible to someone writing<textarea>s already render the text inside of them…the function “htmlRend” is for tossing whatever is typed in the textarea into the htmlDiv's innerHTML so it makes some sort of live preview
It lags behind one key press for some reason, i'm not sure why, or how to get around this but pressing shift could be a workaround for the end-userAlso, how is this a joke?I found it funny how extremely simple it was to makeAnd inserting code that could potentially lead to data breaches and server crashes.<script>//Insert malicious JavaScript here</script>
you're meant to be able to make small webpages with it
- Mr_rudy
-
Scratcher
100+ posts
advanced hahas
Why did the Java developer quit his job? Because he didn't get arrays
(get it, like a raise)
(get it, like a raise)
- dynamicsofscratch
-
Scratcher
1000+ posts
advanced hahas
(#245)you literally wanted to ask if we dip our nachos or not? in the advanced hahas topic?
Do you (Nintendo 64's Micro processor name but the last letter is gone and the first letter is replaced with d) your Nachos or eat them without (Nintendo 64's Micro processor name but the last letter is gone and the first letter is replaced with d)ping
- dynamicsofscratch
-
Scratcher
1000+ posts
advanced hahas
(#252)Why didn't the C developer get the job? Because he was blind.
Why did the Java developer quit his job? Because he didn't get arrays
(get it, like a raise)
(get it, like he couldn't see/C)
- alwayspaytaxes
-
Scratcher
500+ posts
advanced hahas
Why did the Java developer quit his job? Because he didn't get arraysWhy couldn't Haskell go to the fancy restaurant? Because he had no class
(get it, like a raise)
- dynamicsofscratch
-
Scratcher
1000+ posts
advanced hahas
me tryna up that jokeWhy did the Java developer quit his job? Because he didn't get arraysWhy couldn't Haskell go to the fancy restaurant? Because he had no class
(get it, like a raise)
- dumorando
-
Scratcher
100+ posts
advanced hahas
stuupid nerds: avoid global namespace pollution!!!!
me:
me:
let packages = await fetch("https://javascript.dumorando.com/packages.json").then(data => data.json()) packages.map(pkg => { let newscript = document.createElement("script"); newscript.src = `https://javascript.dumorando.com/${pkg.replace("/", ".")}.js`; document.body.appendChild(newscript); });
- dynamicsofscratch
-
Scratcher
1000+ posts
advanced hahas
(#257)*the nerds becoming more nerdier*
stuupid nerds: avoid global namespace pollution!!!!
me:let packages = await fetch("https://javascript.dumorando.com/packages.json").then(data => data.json()) packages.map(pkg => { let newscript = document.createElement("script"); newscript.src = `https://javascript.dumorando.com/${pkg.replace("/", ".")}.js`; document.body.appendChild(newscript); });
- mybearworld
-
Scratcher
1000+ posts
advanced hahas
(#257)I'm honestly surprised you can dynamically add script tags like that
stuupid nerds: avoid global namespace pollution!!!!
me:let packages = await fetch("https://javascript.dumorando.com/packages.json").then(data => data.json()) packages.map(pkg => { let newscript = document.createElement("script"); newscript.src = `https://javascript.dumorando.com/${pkg.replace("/", ".")}.js`; document.body.appendChild(newscript); });

- dynamicsofscratch
-
Scratcher
1000+ posts
advanced hahas
(#259)(#257)I'm honestly surprised you can dynamically add script tags like that
stuupid nerds: avoid global namespace pollution!!!!
me:let packages = await fetch("https://javascript.dumorando.com/packages.json").then(data => data.json()) packages.map(pkg => { let newscript = document.createElement("script"); newscript.src = `https://javascript.dumorando.com/${pkg.replace("/", ".")}.js`; document.body.appendChild(newscript); });




- Chiroyce
-
Scratcher
1000+ posts
advanced hahas
stuupid nerds: avoid global namespace pollution!!!!i tried that - took 14s for all the scripts to load and ended up with 1400+ errors in the console lol
me:let packages = await fetch("https://javascript.dumorando.com/packages.json").then(data => data.json()) packages.map(pkg => { let newscript = document.createElement("script"); newscript.src = `https://javascript.dumorando.com/${pkg.replace("/", ".")}.js`; document.body.appendChild(newscript); });
- Discussion Forums
- » Advanced Topics
-
» advanced hahas










