3 ms·
> 100% static HTML/JS app. > under 300 LOC > "Do nothing" button WTF mf, why are so many lines and fancy tech for do nothing button?
by tuyguntn 1y ago
> 100% static HTML/JS app.
> under 300 LOC
> "Do nothing" button
WTF mf, why are so many lines and fancy tech for do nothing button?
- sebastiennight 1y agoLast week we had an entire game of DOOM in a QR code... I think someone can get us "Do nothing" in less than 300 lines of code.
- chrisbuc 1y agoI'm sure someone can get it smaller than this (save as .html) <input id="i"> <button onclick="l.textContent='Now do '+i.value">Do This</button> <button onclick="l.textContent='Do nothing'">Do Nothing</button> <label id="l"></label>
- sebastiennight 1y agodata:text/html;,<input id=i><button onclick="l.textContent='Now do '+i.value">Do</button><button onclick="l.textContent='Do nothing'">Nope</button><label id=l> Will work in your browser if you copy/paste it. Or as a QR code: https://d1yei2z3i6k35z.cloudfront.net/2914/6815454b25323_qr-code-bee-is.svg https://d1yei2z3i6k35z.cloudfront.net/2914/6815454b25323_qr-...
- deleted 1y ago[deleted]
- tuyguntn 1y agoYou forced me to stand up and write the code. Here is your cross-platform desktop app in 10 lines, pretty sure others can do better than me: package main import ( "fyne.io/fyne/v2/app" "fyne.io/fyne/v2/widget" ) func main() { w := app.New().NewWindow("One Button App") w.SetContent(widget.NewButton("Do Nothing", func() {})) w.ShowAndRun() }
- dingnuts 1y agoYou only need two Tcl statements, shown here on one line for the sake of this pissing contest: button .b -text "Do Nothing" -command {exit}; pack .b