ID:2100115
![]() Jun 14 2016, 6:39 am
|
|||||||
| |||||||
It would be nice to limit the height of the <"dm"> tag "window" and have a vertical scroll in it, so as to not limit the size of the content inside of it. Basically, to be able to post a lot of code but not unnecessarily increase the height of the post by thousands of pixels. My recommendation would be an already built in limit of around 300-500px, which would provide space for 30-50 lines with no need for scrolling. And be about 3 to 5 times the size of this post. Not that bad, right? |
![]() Jun 14 2016, 9:25 am
|
|
I like this suggestion.
|
I already added this myself as a userscript, I don't have it since I updated my stuff, but I can probably write another copy up when I get a spare few minutes. The box already handles horizontal scrolling so it's a very trivial styling change.
|
#Testing ^ While you're at it |
You might want to look into something like https://github.com/isagalaev/highlight.js with a custom language definition.
There are already some pre-made DM language definitions for various editors that could possibly be re-used. I wrote https://github.com/Chnkr/sublime-DM a while back for sublime text. And there is also https://github.com/PJB3005/atomic-dreams which highlights text for atom. You might be able to re-use those grammar definitions. |
Here's a userscript for what you need. You need to install either GreaseMonkey on Firefox, or TamperMonkey on Chrome (unsure what IE/Edge uses, don't care).
// ==UserScript== |
Yeah, I was gonna use Stylish but I got the idea to do something about being able to drag/drop the box to resize it so I went with javascript but never actually did what I went javascript for lol.
|