[The image shows three files open in an IDE, two on the left and one on the right. The first, in the top-left, is named index.html. The <head> section, spanning lines 4-10 of the file, is collapsed to only display its opening and closing tags. The visible code is as follows:]
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<div class="loading"></div>
<button id="buttob">buttob</button>
<div class="modal">
<div class="modalWrap">
<div class="modalText">
Are you sure you want to h🥑?</div>
<div class="wrap">
<div class="confirm">yes...</div>
<div class="cancel">NO!!!</div>
</div>
</div>
</div>
<div id="fadp"></div>
<script src="./scr.js"></script>
</body>
</html>
[index.html ends. The second file, in the bottom-left, is named scr.js and displays the following code:]
40
u/ItsGashy May 12 '23
Wheres the ban button?
29
u/slideesouth May 12 '23
Why did you call it buttob ? It’s referenced at least 3 times I guess there’s a reason you didn’t change it
15
u/Lataero May 13 '23
I don't think you know what spaghetti code is. There is neither interweaved dependencies nor is it particularly hard to maintain.
However, ain't no browser in the world this won't work on.
All it needs is a format
12
u/MurdoMaclachlan public boolean isInt(int i) { return true; } May 13 '23
Image Transcription: Code
[The image shows three files open in an IDE, two on the left and one on the right. The first, in the top-left, is named
index.html. The<head>section, spanning lines 4-10 of the file, is collapsed to only display its opening and closing tags. The visible code is as follows:][
index.htmlends. The second file, in the bottom-left, is namedscr.jsand displays the following code:][
scr.jsends. The final file, on the right, is namedstyle.cssand displays the following code:][
style.cssends.]I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!
7
u/caliguian May 13 '23
This is not spaghetti code.
15
u/arnitdo May 12 '23
There is literally a HTML
<modal>element4
u/Xeonmeister May 13 '23
why is modalWrap inside modal?
4
u/Does_Not-Matter May 13 '23
“Are you sure you want to h 🥑?”
“Are you sure you want to have a cow, though?”
3
u/stopleaksfast May 12 '23
This looks about right for something in 6-test-modal
2
u/SomeMaleIdiot May 12 '23
Doesn’t seem bad imho
1
u/purefan May 12 '23
neovim?
1
u/scooptyy May 13 '23
Jesus Christ
1
u/sofanisba May 13 '23
Variable assignment? What variable assignment? queryselector 4 lyf
1
u/proguybutingoogle May 13 '23
this code is not bad auctuallhya <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal> <modal>
1
u/Bowiemtl May 14 '23
I wouldn’t consider this spaghetti code, just hardcoded or a non modular implementation
1
u/uvero wicked May 14 '23
Are you sure you want to h🥑?