« first day (734 days earlier)      last day (690 days later) » 

3:24 AM
@OlegValteriswithUkraine I'm watching for it.
The new mods haven't even been crucified yet
I think things are changing
@VLAZ Wouldn't it be simpler to just get an inbox notification when every post on SO is edited? /s
 
@CodyGray where's the fun in that? :)
 
It's been plenty of fun
Now, individual mods are not crucified, just the entire team is smeared collectively
 
@VLAZ btw, already done it, but only for mouse clicks for now - need to build up some fat on the script first (also added options to follow posts on bookmarking and after inline edits specifically). Keyboard shortcuts will be hooked in 2.0.0, which is coming around this week
@CodyGray oh, nice, progress! now the executions are done in bulk
 
3:39 AM
They're not executions anymore, they're torture
 
3:54 AM
huh, yes, they certainly look like slow torture, my bad
 
 
6 hours later…
9:29 AM
@CodyGray Just waiting for the outcry over the "not a code-writing service" mod messages :-)
That'll be my hill to die on.
 
Mmm, yeah.
It's getting better over time. :-)
 
The template, you mean?
I've been tweaking it to be more general and comprehensive as I encounter different versions of the comments.
 
@RyanM The hill. Getting comfy with all the blood that soaks in it.
 
Ha.
 
Yeah, I meant the template
More general and comprehensive, eh? Do those antonyms go together?
 
9:33 AM
Making it cover more cases, I mean
...though quite unexpectedly, I've been getting almost entirely positive responses.
 
I hadn't noticed you'd been getting responses. Admittedly, we get a lot of responses; I don't read them all.
I mostly read the ones that say "<censored> you <censored>". Those are my favorite.
Clear, concise, effective communication.
 
> Hi there,
>
> Thank you for the links you have added to the message; I now understand that I've had wrong impressions of the required criteria for questions.
>
> I will be making more suitable comments in the future.
>
> Have a good day, [name redacted]
 
OK, that was just now; hardly fair. I thought you were referring to a longer pattern.
 
Oh, I was.
@CodyGray what about "ok boomer"? We got that earlier today.
also the most recently instance of "<censored> you <censored>" actually was "<censored> u <censored>" - even more concise!
another one of the positive responses:
> Noted
>
> Thank you for bringing this to my attention
 
@RyanM I... had to look that one up.
"Please find somewhere else to troll with your friends."
That did sound kinda like an out-of-touch dad comment.
 
9:45 AM
Well I had to write something and I didn't feel they deserved my best efforts.
 
oh, sorry, I think I accidentally stumbled into the TL room
 
@RyanM The shorter it is, the more effective the communication. In terms of information to character ratio.
 
Unless you get to a point where no one can understand what you're trying to say.
 
I guess technically there's no requirement I write anything more than {optionalSuspensionAutoMessage}
 
x => u no get me
 
9:50 AM
I also recently got "F*** you, you f****ts." after suspending someone for 30 days, followed by "You are still f****ts." after adjusting their suspension to a year.
asterisks, obviously, not in the original :D
 
"And you're still suspended."
 
...then another moderator deleted their account :-)
 
Damn, no chance to send the reply
Yeah, I saw that, though
 
"Yeah, but I'm in SF, it's actually pretty great for f****ts."
 
hahaha
And everyone else
 
9:53 AM
...as long as they can afford rent.
 
I would imagine that's a problem for the f****ts, too, though.
Wow, it's almost like they're people, too.
Now I wait for people to flag my chat message and the flag to be presented completely independent of context.
 
...I was thinking that about mine, but yours is worse out of context :D
 
Haha, yup
 
Did they make YouTube uglier?
Oh dear, yes. And you can now move comments over to the right sidebar.
But why
 
@CodyGray wut?
@VLAZ eh, that's pretty much how "I quit" meta posts tend to go
 
bahaha
 
10:49 AM
I do not, in fact, want to unfreeze every room I enter...
(found while debugging a completely unrelated issue)
 
#modproblems?
 
Found it: this line is breaking FIRE
replacing the innerHTML like that messes up the jQuery element data storage on the fire-button element.
 
11:32 AM
Not sure how to fix that, any tips?
 
Not sure what to do in response to a chat message that's actually on-topic for the room where it was asked.
 
@RyanM use standard DOM API to update instead?
@CodyGray as if anyone cared for topicality at this point :) they all look the same to me lately
 
pff, too easy
should've went for the friendly bin :)
 
Of course I got the formatting wrong the first time. Bah :-p
@OlegValteriswithUkraine Dumb question: what would that be?
I'm an Android dev :-p
 
11:40 AM
oh, sorry to hear that :)
joking aside, document.createElement and all that
need to review closer, though, I haven't used the script
oh, wow, that script is quite useful
 
The broken one? ;-)
 
Chat Improvements? Yeah, that's why I'm trying to troubleshoot it rather than just disable it for breaking another one of my scripts :D
 
@CodyGray yup
well, the "breaking one"
 
@OlegValteriswithUkraine how would you createElement halfway through a line of text though?
 
I'd move the regex /(^@|\s@)([\w\u00C0-\u017F.-]+[^.\s])(\.?(\b|\s))/g to a matchAll or into a loop analog for compatibility
then iterated on matches, found Text nodes and replaced them with spans
that's a first hunch
 
11:50 AM
How would that avoid breaking some data that jQuery stores with an element?
 
Cool, thanks :-) I'll take a crack at that at some point, but I should do my actual work for now :-p
 
because it would not replace the element's HTML, @CodyGray?
only replace nodes
 
I guess I did not understand
Oh
Replacing nodes in the HTML is not replacing the HTML?
 
nope, replacing via innerHTML has some important differences from replacing/appending/prepending nodes
innerHTML reparses the whole thing, which can break a lot
for example, it shoves off any event listeners
 
Eeek. I feel like I might do that in multiple places in some of my scripts.
 
11:53 AM
that depends on the context, though
it won't cause the shove off if just replaced
but one might want to use it to append (+=) elements, and that's not going to end well
in general, it is considered best to avoid innerHTML like hell
 
@RyanM the possibility on that would depend on whether the contents are flattened, though (setting textContent flattens all Text nodes IIRC), but then it can likely be worked around with text ranges.
 
@CodyGray :-( I remember thinking that was elegant and readable when I came up with it.
 
@OlegValteriswithUkraine did you reply to the wrong message?
 
@RyanM unless the script is very broken, no :) I was following up on my first idea about replacing text nodes
 
12:00 PM
oh I see, gotcha.
 
what I meant is that if the text is flattened (a single text node spanning the element), it would be a bit of a chore, but still doable
there's an alternative: convince FIRE maintainers to not use data() :) I find it weird storing data on elements unless it's on the dataset, and then it's easier to set it via standard DOM API again
@CodyGray well, it's certainly readable, but [potentially] suffers from the abovementioned problem + it causes a reparse of the whole element. That's hardly critical in a userscript, though
 
Reparsing would matter because... of performance?
I consider that a feature.
Especially for a userscript. They're slow enough already.
 
usually because of performance, yes
there are standard DOM methods for appending raw HTML, btw
 
Reparsing is quite slow compared to creating the element and appending it.
 
12:05 PM
It will very definitely make a difference if done a lot like in a loop.
 
Well, the problem is, I wasn't appending something that was going to have a single container, or I would have done it that way.
 
append() can be used if you want to give it an HTML string.
 
and yeah, a more modern way
 
I've never heard of these things
I guess they're stuff that has been added more recently to browsers
 
12:08 PM
Shocking. I thought you've been doing web dev for years.
I mean, they are relatively recent. In that these came after jQuery. jQuery itself already had an .append() method and it accepted HTML.
 
It's been at least 2, yeah
 
@CodyGray no, not really - insertAdjacentHTML has been around since IE4 (properly since IE10)
append is new-ish (so are after and before)
 
I suppose something like this is fine, since it's on a newly-created element that hasn't been inserted into the DOM yet?
It's frustrating though that there are so many different ways to do the same thing.
That makes it really difficult to figure out the correct way.
 
@CodyGray yeah, it's fine
 
It's especially annoying since some of the methods are just bad with hidden costs that are not at all apparent. And some are legacy ones where there are newer options that might be simpler to use or have less side effects.
 
12:12 PM
@VLAZ those would be (hidden costs)..? genuinely asking, btw
 
@OlegValteriswithUkraine Depends on what you're after. But append() is slightly more convenient than appendChild() for example. Former accepts HTML as input and Nodes, latter only Nodes. Separately, creating a bunch of elements and appending them one by one works but it's going to be slow and probably trigger re-flow a bunch of times. While adding them to a DocumentFragment and adding in bulk is going to be faster.
However, it's really hard to find what you actually need. And it's all related to adding an element dynamically. The way you do it might influence what you need. But not really how you search for the correct approach.
 
@VLAZ oh, no, I meant the ones with hidden costs, nothing comes to mind off the top of my head. As for append, yeah, as soon as I realised I can get away with not even bothering with polyfills, been using only it (and after/before on rare occasions)
in general, I rarely find DocumentFragment to be needed - I tend to make the wrapper, keep it in memory, create the rest of the elements, append everything together and after that's done - append the wrapper to the node that is connected to the DOM.
 
For hidden costs, I mean stuff like triggering a re-flow. A for loop that does .innerHTML += "<div>something</div>" for example
But speaking of innerHTML, this is also a common problem
el.innerHTML += "<div>"
el.innerHTML += "someContent"
el.innerHTML += "</div>"
 
@VLAZ what you just sampled is unholy
the room needs cleansing!
 
I've seen many people ask why their HTML is wrong after that. And there is the hidden catch - adding HTML must be valid. It's not just a string. So el.innerHTML += "<div>" will make it a valid DOM node and actually inserts a full <div></div>. The rest is then appended after that tag.
 
12:24 PM
it is even more fun if the element is already connected to the DOM
 
1:06 PM
That is definitely hidden.
One would not intuitively think that modifying a string property would command forth all that magic.
 
1:38 PM
@CodyGray there's actually pretty complex algorithm under the hood defined by the HTML spec, but since no one reads it... even when it's their damn expertise field...
 

« first day (734 days earlier)      last day (690 days later) »