behavior HorizontalScroll on wheel(event) from me halt the event's default if event.deltaY is not 0 then set me.scrollLeft to me.scrollLeft + (event.deltaY * 3) end end end -- behaviors in ///_hyperscript allow you to take all the behavior that goes in a _="" and put it somewhere else (in this case, the ._hs file.) -- for some reason they are in the "Advanced" section in the docs but this feels perfectly reasonable for big things that are long -- naming convention is PascalCase. -- Also this is how you make comments in ///_hyperscript def makeId() set currentResult to '' set characters to 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' repeat 10 times set currentResult to currentResult + characters.charAt(Math.floor(Math.random() * characters.length)) end put currentResult into #upcat-code.innerHTML exit -- keyword at the end of the function should be either "return (var)" or "exit" end -- My other comment below is wrong. The problem was trying to use the keyword "result" as a variable name, which is a reserved word in ///_hyperscript. -- naming convention is camelCase. -- Peculiar stuff going on here. You can't directly do a "set currentResult to currentResult + chars.charAt(Math.floor(Math.random() * chars.length))" because idk lmfao"