The 'Work Around Discourse Bullshit' thread (2)
-
Another one? Fuck.
-
You're surprised?
-
The sad part is, no, I'm not. It's just that I thought TDWTF had broken Discourse so many ways it couldn't find many more left.
-
The ways to break Discourse are endless.
Dicsourse, of course.
-
-
It's pretty easy to find bugs. I just found another one tied to the counters and muted categories. The question is, should I bother posting it here to maybe get reported by someone over on meta.d?
-
Fun experiment: if you have a "screenshot entire page" extension installed, let it loose on Discourse.
I recorded my attempt but...
Yeah... I suck at GIF.
Edit: Fuck, there it goes with regional dates again... where did I turn that shit off last time...
-
It's either that or post it on meta.d yourself. Pick your poison.
-
Imagine trying to use such a plugin on the Likes thread ...
-
post it on meta.d yourself
I won't. I'm already set on not making an account and posting over there. I'll post it here since this is TDWTF, so if anyone else wants to push it over, it's on them.
-
Don't worry, won't get far. I managed to capture the "Loading" thing some times, other times it just gives up and, for some reason, doesn't even trigger the scroll event...
-
That's disappointing. It would be fun to have a continuous image of our favorite topic.
-
That's disappointing. It would be fun to have a continuous image of our favorite topic.
@Ender made one of the fa-spin thread using a (at a guess) video capture combined with the middle click scroll thing, which he turned into GIF.
-
And I posted the thread about the other bug I found which apparently wasn't new but wasn't fixed even though the topic was closed as such.
-
@ender made one of the fa-spin thread using a (at a guess) video capture combined with the middle click scroll thing, which he turned into GIF.
I also made a video of the Official Likes Thread.
-
That was about 30 minutes long, IIRC. And I believe that was before 10k.
Edit: Just checked. 36 minutes for 4.7k posts.
-
...so you're saying I should do another one?
-
Only if you want to let your computer sit for about 1.5 hours to make the video.
-
Only if you want to let your computer sit for about 1.5 hours to make the video.
Will do that when I get back home. And I'll just make it scroll faster, so it doesn't tie down the computer for that long.
-
Opera Chromiclone doesn't have the middle click scroll???
FFFFFFFFFFFFFFFFFFFFFFFFFFF...
<insert rant here>
-
Huh? It works for me, though it isn't quite as smooth as in Opera Presto.
-
Maybe they load OS-specific shortcuts? I don't remember if UNIX set in Opera Presto had middle mouse scroll enabled by default.
And, if it exists, I can't find an option for it. Dear $DEITY can I not find 80% of the options for anything anymore.
Filed under: #bring-back-opera:config, no, aliasing opera:settings to opera:config doesn't count
-
I pointed this out a while back in the Topagination topic. You can run an "onload" javascript to hook events at the document level just one time, and as long as you do not hit F5 or open new tab/windows, the document onload remains stable (including going back and forth between the main topic list and individual topics - use the TDWTF logo icon at the top to go home without unloading the page), because they almost never actually navigate you to a new page. They override all the "links" with javascript hooks to call JSON for the page and load into the existing app shell instead.
Which causes some extremely bizarre bugs when you regular click links they overrode but shouldn't have and get errors back instead of loading a new page, or you middle click things that looked like links but aren't and get errors back instead of popups.
-
I got it right after I was corrected. You are correct. Also, if not for Alex and Jeff being buddies, that is the kind of shit that is front page worthy.
I need to go back over my work from yesterday. On a MS application I ran in to a site that when loading in IE 10 or 11 would report back saying that it needed IE 6+. I dug through the JS that did browser detection and the way the logic was set in place, it was saying that 11<6 as it only read the first character after IE on browser detection. Because of that, browser detection for IE would fail until they reached version 60+.
No idea why that came to mind, maybe because they are both JS clusterfucks?
-
@Intercourse said:
No idea why that came to mind, maybe because they are both JS clusterfucks?
String comparisons. Change the variables to only have the version number and use "+" to coerce them to numbers.
edit - nevermind, I see that you're not asking WHY it's screwed up, just pointing out that both things ARE screwed up.
-
use "+" to coerce them to numbers
I think you're thinking about PHP or something like that. JavaScript will happily still interpret them as strings, since
+
is used for concatenation as well.Yeah, mostly it works. But I don't trust it, just like I don't trust
==
.
-
@Intercourse said:
I got it right after I was corrected. You are correct. Also, if not for Alex and Jeff being buddies, that is the kind of shit that is front page worthy.
We should try anonymizing it enough to get it on the front page, and then reveal afterword that it is Discourse ...
-
We should try anonymizing it enough to get it on the front page
I don't think that's doable tbh.
-
Oh, but if it were...
-
I think you're thinking about PHP or something like that. JavaScript will happily still interpret them as strings, since + is used for concatenation as well.
Yeah, mostly it works. But I don't trust it, just like I don't trust ==.
Nein.
I am almost 100% certain that
var a = +"3";
results in a having an integer.
-
@Intercourse said:
Oh, but if it were...
We'd have so much shit to write, we'd have to implement infiniscroll on the front page because no browser could handle that amount of text in one go.
-
And I know that doing
[code]
var a = +"3";
var b = +"11";
alert( b > a ? "we be ints" : "we be strings");
[/code]
works to print we be intsvs
[code]
var a = "3";
var b = "11";
alert( b > a ? "we be ints" : "we be strings");
[/code]
which prints the string one.
-
Well, we could start by making it a chat room app (close enough with all the real-time updating in Discourse). And just leave names out of it. It would be a start.
-
I am almost 100% certain that var a = +"3";
results in a having an integer.Oh. Like that.
Adding to my book of "stupid tricks to use in JS". It's just below
!!a
now.
-
Oh. Like that.
Adding to my book of "stupid tricks to use in JS". It's just below !!a now.
Si senor!
It's a very good one when dealing with parsing/scrubbing decimal numbers from stringular data. Beats typing parseInt() unless you are trying to do hex or octal base values.
-
Course, if the next guy doesn't understand the code and goes and puts something in front of the +, now you still have a string, and it's even worse than before
-
That moment when you get annoyed by JS and want to go back to PHP because it has somewhat proper coercion...
-
Also, just saw this:
I'm pretty sure this is the case on other threads, too.
Of course, me posting to the thread fixed it. Hah. And it looks like it never considers the OP when saying who has "most posts".
-
Topic change: Screw with your javascript sharing co-workers
You could also do this asinine trick whenever you feel like saving yourself from typing Math.floor() on positive integers ;o
[code]
alert( ~~5.3|0 );
alert( ~~5.1|0 );
alert( ~~6.0|0 );
alert( ~~4.9|0 );
[/code]
-
The fuck is tilde for? And a single pipe? Oh... Oh no, it's not...
*google*
You evil bastard!
I love it!
-
The fuck is tilde for? And a single pipe? Oh... Oh no, it's not...
Oh it is.You evil bastard!
Don't you know it.
-
And it looks like it never considers the OP when saying who has "most posts".
Of course not. We can't have someone in that list multiple times.
-
Just in from meta.d:
PJH: ... The only GIMPing that's gone on here is to blur some naughty words ...
Hmmm....
-
Just in from meta.d:
> PJH: ... The only GIMPing that's gone on here is to blur some naughty words ...
Hmmm....
Aww, come on! They should be able to take it!
-
So they come across crap like:
[code]
//user inputs
var $$ = window.prompt("Pick a number between 0 and 9","5");
//.
//.
//some inits
var _ = Math.random()*10
, ಠ_ಠ = "sucker, you missed"
, ლ_ಠ益ಠ_ლ = "yay you win, it's party time!";
//.
//.
//.
//then later you see something like...
//.
//.
//.
alert( (~~+_|0) == $$ ? ლ_ಠ益ಠ_ლ : ಠ_ಠ);
[/code]And then they will never ask you to help with javascript ever again.
-
And then they will never ask you to help with javascript ever again.
People actually ask that?
I usually just hear screaming when JS is mentioned...
-
@Intercourse said:
I got it right after I was corrected. You are correct. Also, if not for Alex and Jeff being buddies, that is the kind of shit that is front page worthy.
I need to go back over my work from yesterday. On a MS application I ran in to a site that when loading in IE 10 or 11 would report back saying that it needed IE 6+. I dug through the JS that did browser detection and the way the logic was set in place, it was saying that 11<6 as it only read the first character after IE on browser detection. Because of that, browser detection for IE would fail until they reached version 60+.
No idea why that came to mind, maybe because they are both JS clusterfucks?
That and the fact IE 11 doesn't automatically identify as MSIE any more specifically to neuter browser sniffing.
-
That and the fact IE 11 doesn't automatically identify as MSIE any more specifically to neuter browser sniffing.
I wasn't aware of that. So MS is so embarrassed of their product that they will not even identify with it.
-
@Intercourse said:
So MS is so embarrassed of their product that they will not even identify with it.
And they picked the moment when the damned thing actually started to be worth a damn?
Just peachy.
-
I have never been able to handle IE. I cannot even stand the newest versions. When I was working through the JS issue at a client's location I had to install Chrome. View source in IE does not let you open JS source links. Their terminal is shit. Telling IE11 to emulate IE9 only emulates how it handles source, it still reports itself as IE11 to the server.
And even if they fixed all of that, I would still be annoyed that the slowest loading page on the internet is the default homepage when you open it. MSN.com is a ghastly POS and takes several seconds to load, and once it gets halfway loaded, you get a second tab welcoming you to your new shitty browser.
I keep an MSI of Chrome around, just so I never have to touch IE. Not even to download Chrome.