Torreblanca: Hi, can someone tell me at what event I have to trigger my script to make it change the username CSS?
Tabolt: I tried $window.loadfunction but it doesn’t seem to affect the usernames, the uernames are shown in a later delay when th sub-forums are collapsed.
Chicca: Jordy, is this some personal script you are using to change the forum appearance?
Mearns: Yes, I want to add borders to the usernames.
Cordaro: I’ve been stuck with a fundamental JS problem, please have a look http://stackoverflow.com/questions/32543696/variable-does-not-return-desired-object
Straight: Ktchup: you should do all your requires at the top of the file
Straight: Ktchup: also, it’s best for modules to export one thing ie, module.exports = foo
Bertelsen: Ljhardb, I will try these tips
Straight: Ktchup: also you’re not using any of the return values in “app.js”
Sagar: Http://pastebin.com/uDZyxwwd what I have now
Straight: Ktchup: also, it’s a really weird/bad pattern to do that “app reference” thing every time – just make getUserRepository take app as an argument.
Laaker: Have never used UserScript, does it always include jQuery?
Mcnees: Or don’t you have to include it?
Amini: Straight: none of the functions in app.js return anything, they just take the app object and edit it. I am using that pattern because I can’t figure a way to access the app instance from my controller
Dellaripa: All client side build tooling sux
Dobberstein: Just wanted to let it out
Straight: Ktchup: just always p*** it around
Straight: Ktchup: ie, require’controller’app and then your controller has it.
Straight: Ktchup: don’t mutate things, it’s bad for clarity.
Palowoda: Straight: alright, hopefull these’ll do
Warzybok: Also, alias node=’babel-node’, and alias gulp=’alias gulp=’babel-node $HOME/.node_modules/bin/gulp’
Coupland: Uhm, you shouldn’t use for in to iterate the array
Halima: You should use forEach or a regular for
Straight: Never a loop :- forEach/map/etc
Straight: Depends. if you’re doing nothing but side effects, forEach is ideal.
Tamburrino: I was hoping to catch Dekok before I went to bed.
Sabbah: How do I print the cpf value in the input field?
Uc: Hm, I know that engines like V8 like to optimize explicit calls like Object.keys and Math.round, etc. But what about functions that are invoked with .call? Array.prototype.slice.call, etc. Is there any optimization if you make the explicit call every time? Or is it better to cache Array.prototype.slice as a variable and then .call on the variable?
Straight: It’s the same function object
Straight: So it’d be optimized the same
Straight: I usually cache it, but the performance should be about the same.
Santopietro: How do I print the cpf value in the input field?
Capps: Input type=”text” value=”scriptdo***ent.writecpf/script”
Kment: A for loop is always faster than forEach by a lot
Sowders: I have an integer between 0 and ~10. i want to turn that into a HTML hex colour code. is there some 1-liner for this ?
Kment: Pretty much never use it
Sowders: Is there a printf”%02x”, i ; type of function in JS ?
Bedner: But doesn’t the for loop blocks the event loop?
Kment: MinusFour: both foreach and a regular for loop block
Cooperstein: Is there a way to run many Asynchronous XMLHttpRequest ? I am using a worker, and loop over 3 XMLHttpRequest, but they are run one after an other.
Gershkovich: Kment: please stop giving terrible advice
Gridley: Why do you want to give it a name
Magic: Sorry, i meant i parroted the post you linked to **
Capestro: Zufall: not nearly as much as the DOM operations.
Lamoreaux: Empty brackets convey your intent better in a lang like js that for some reason uses _ for silly things all the time
Hartshorne: Yes I need to get into better array habits myself
Gentleman: Zap0: a it won’t likely matter much, b splice probably isn’t doing that under the hood, c don’t ever worry about memory or performance until after it’s built, working, tested, AND profiled.