Skip to main content
rojo's user avatar
rojo's user avatar
rojo's user avatar
rojo
  • Member for 10 years
  • Last seen more than a month ago
  • Tennessee, USA
awarded
revised
Looking for a script to show countdown timer below posts for easier edits
workaround for election countdowns and other future date/times
Loading…
awarded
awarded
awarded
comment
How can a userscript detect when a post's been edited in place, so that it can do stuff to the newly edited post?
I use MutationObserver to watch the document root and reapply event handlers in my stuff. It's flawless as far as I can tell. MutationObserver is the correct answer I think.
comment
SE like I like it userscript
@A.L I'm sorry, but I'm not sure that understand what you mean. Are you saying that only spaces can be used to define a code block on StackExchange pages? If so, I think you're mistaken. A tab will work just as well as 4 spaces to define a code block in StackExchange network's markdown syntax.
comment
SE like I like it userscript
@A.L I appreciate your feedback. If my script's replacement of spaces with tabs is irritating to you, then you might prefer balpha's script. His uses spaces for indenting. Modifying my script to indent with spaces would be prohibitively complicated, as so much of the logic depends on spaces being converted to tabs. But as you say, it's invisible, and I prefer it this way. It's faster for me to arrow key through 2 tabs than through 8 spaces.
comment
SE like I like it userscript
@A.L Ah, thanks for pointing out that bug. [Enter] was mis-handling the 4-space indentation. I fixed it. You can now indent with 4 spaces and the script will continue auto indenting with tabs. Try it out and let me know if it's still a problem. Merci beaucoup!
awarded
revised
SE like I like it userscript
added thumbnail, metadata, and license info
Loading…
revised
Loading…
awarded
revised
SE like I like it userscript
added support for End and solidified behavior of double taps of Home and End
Loading…
revised
Loading…
revised
Loading…
Loading…
awarded
revised
SE like I like it userscript
removed animated gif
Loading…
asked
Loading…