« first day (1106 days earlier)      last day (3832 days later) » 

CSS Question yo!
0
Q: Prevent element to lose CSS "focus" when changing browser tabs

Lucas BThe JSFiddle speaks for itself Open this fiddle http://jsfiddle.net/NfRN5/ Click the input field Change tabs on your browser Come back to the fiddle - the width effect will run again =/ How to prevent this? Make it steady when user navigate away and then come back input.search-field { width:...

 
12:29 AM
@LucasB I don't think that issue can be solved in pure css
is that a "requirement"?
 
1:00 AM
any one know how to calculate the total distance from two points along a curved path
 
@Dave google "Arc Length"
It really depends on exactly what kind of curve you have
 
@whitehat101, it's not mandatory, what alternative you suggest?
 
damnit...
 
@Zeus Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@ThiefMaster I've accidentally merged a testing account (florian+1@margaine.com) with my main account. Can you do something about this? (like, delete florian+1...?)
 
1:04 AM
what do you mean by "kind of curve"
circular curve?
 
I'm a help vampire. Anyone want to make something amazing in Node.JS with a UX guy? Probably take a few hours and you'll have a magnificent portfolio piece!
 
Like a perfect circle?
 
yeh
 
hahahaha
oh
 
The circumfrence of a circle is 2*pi*r
 
1:05 AM
you're talking to Dave...
 
so, you might want a quarter of that
 
@whitehat101, take a look at Apple's search, I was trying to do that apple.com
 
@LucasB I posted an answer
Apple is adding a class to a parent element, too
 
1:22 AM
Saw it, it's almost perfect
There's only one thing, it should remove focused class when clicking anywhere outside the input (like Apple's)
I'm trying to do it here too, but if it's easy for you would spare me some time and then I could study what you did straight the right way
Sorry for the lack of commas.
 
I'm playing with click events on the HTML element
unfortunately, the blur happens before the click... and hum
ah-ha, that makes me feel better
Apple does it using setTimeout()
 
What does it mean?
is it like a quick-fix? lol
 
Usually it's kind of a "gross" solution
search for "searchmode" in that js file
I'm curious, so i'm going to un-minify it, to see how they did it
 
1:41 AM
got something bro?
@whitehat101, taggin' you so it beeps
 
I thought so, but I must be missing something
AC.GlobalNav.prototype.decorateSearchInput = function () {
    if (this.globalSearch) {
        var k = document.getElementById("g-search");
        var j = document.createDocumentFragment();
        var h;
        var l;
        var m;
        var n = this;
        var i = true;
        this.globalSearch.setAttribute("autocomplete", "off");
        this.globalSearch.setAttribute("autocorrect", "off");
        this.globalSearch.setAttribute("autocapitalize", "off");
        this.globalSearch.setAttribute("role", "combobox");
That's Apple's JS. I'm trying to make a simplified fiddle, but i'm missing something...
the function m and variable i are the most important things
 
looks promising
 
1:57 AM
0
Q: PHP Application, attempting to restructure (Massive case/switch, ajax calls)

tmacbackground A little over a year ago I was given the creative freedom to develop on the side of my primary responsibilities. I want to move into development, but am not currently in that role. I was given the resources to develop a PHP application that handled a lot of the reporting functions for...

 
0
Q: Access iphone app directory using external javascript

kongkeaI have integrate iphone app with web. I have an iphone app that use as an end user[interface] and web is background process. I want to play sound when user click something on the app. I want when user click on the app and app tell javascript to play sound in app. I want to do that, because when ...

 
As I think about it... more edge cases come to mind
Tabbing in, esc to close
 
@whitehat101 well I think it's perfect now, right?
looks good
yes, those little improvements that makes a great difference
a good user interface
do you know ux.stackexchange.com ?
it's fascinating
 
2:13 AM
hah, that's brilliant
 
the "trick" of that code is that, it only blurs the input in the 10ms after a mousedown event occurs
 
I'll try to apply it to my current field
Like Apple's.
Thanks @whitehat101, you really stand for your nickname.
Please share your fiddle on my question so I can rate and accept it
 
@rlemon if you want a challange with canvas try doing the solar system where you have to work out travel time with only knowing orbit speeds of planets and spaceship speed. that shit is hard!
 
2:36 AM
@redmallard Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
3:10 AM
Have any of you worked with TogetherJS ?
Never mind I found the docs..
 
3:30 AM
@Jaxo Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
3:46 AM
!!tell BrandonGelfand google TogetherJS
 
Thanks Shea...
 
Just making sure, you see that link that says, "Documentation," both on Google search results and on their site?
 
Yeah... I am a bit blind today
 
Me too :)
 
3:49 AM
@Shea I am doing something wrong here, I don't know what though. I just started js today
(function($) {
	TogetherJSConfig_on = {
	  	ready: function () {
		  	$("#start-togetherjs").text("End Support Session").removeClass("togetherjs-close").addClass("togetherjs-ready");
		  	$("#wp-admin-bar-start_together_js_button").removeClass("togetherjs-close").addClass("togetherjs-ready");
		},
	  	close: function () {
		  	$("#start-togetherjs").text("Start Support Session").removeClass("togetherjs-ready").addClass("togetherjs-close");
		  	$("#wp-admin-bar-start_together_js_button").removeClass("togetherjs-close").addClass("togetherjs-ready");
 
All that really does is set some events, but I don't see anything to actually fire the events
 
How do I fire the events?
 
Well, when is ready triggered? When TogetherJS file has loaded, on DOMReady, when it's idle, when it's initiated, or what?
 
It said to load that after my custom file
 
4:03 AM
can't click
 
From what I can tell, you either start a session, or you join a session
 
Yes, but in the docs it says you can change stuff
 
I clicked start, it gave me a link to share with you, you clicked the link, and connected to the session I started. So I am the host
 
I am trying to do TogetherJSConfig_cloneClicks
Parts of the page change when you click on things so they can't see it unless TogetherJSConfig_cloneClicks = true
 
What does the documentation say about TogetherJSConfig_cloneClicks?
 
4:08 AM
TogetherJSConfig_cloneClicks: This should be set to a jQuery selector. Whenever someone clicks on an element matching this selector, that click will be repeated (as an actual click) on everyone else‘s browser. This is useful for cases when a click typically doesn’t do anything, but shows or hides or switches the view of the page. Note that any control that toggles will definitely not work here! If you have tab buttons that show different things you might use TogetherJSConfig_cloneClicks = ".tab"
Am I missing something?
 
Where does it say it should be set to a boolean value?
 
No where but the other ones are using boolean values
TogetherJSConfig_enableShortcut = true
TogetherJSConfig_dontShowClicks = true
etc
 
Here's a better question: What are you expecting TogetherJSConfig_cloneClicks to do?
 
When I make a click on my screen, it makes one on yours
 
The option seems to be one-directional
 
4:16 AM
What do you mean?
 
If one of the clients make a click, then only the host sees their click, but if a host makes a click, the clients get the click too
 
thats fine
besides that though, how do you initiate it?
 
Just as it says, with a selector string
Do you get the clicks?
 
try a click
 
I get your clicks
 
4:20 AM
Not getting yours
 
Okay, now close that tab, go back, start a session, and give me the link if gives you to invite a friend
 
So it seems only the host gets the clicks
 
I wonder why..
 
Here's how it's done: jsfiddle.net/xWsgz/1
 
4:26 AM
hi
 
helro
 
Hello to all guys
can someone help me to optimize some basic code regarding validation
 
4:45 AM
I've got the login working with passport-local on Node.JS, but I need to let people sign up. Anyone know how to do this?
 
 
2 hours later…
6:55 AM
Why is this anti-pattern so widespread stackoverflow.com/a/19603728/617762
 
stackoverflow.com/questions/19603292/… Can any of you guys answer this?
 
7:55 AM
However, you'll probably like this kongregate.com/games/iojoe/10?tab=achievements
 
8:07 AM
@qwertyk31 Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
8:23 AM
@Zirak I completed that last night.
I really liked the mechanics of it.
 
@mikedidthis You're on Kongregate too?
 
@Zirak stupidly haven't created an account, but played a few games on there.
 
Do. Accumulating internet points is satisfying.
 
uhh that is even worse. I do have an account, but I have never logged in. So many lost points.
 
Hahaha
I got up to level 21 on Kong, I think
 
8:33 AM
I promise, I am not an idiot. I just sound like one.
 
I may not be an idiot, but I play one on the internet.
wut, I'm level 55? When did that happen?
hah, 69 points to level 56.
 
@Zirak I don't want to sound creep, but I really enjoy reading your SO answers.
 
Thanks. I (usually) enjoy writing them
 
user1125394
!!> 'hello !'.match(/\w+/).length
 
8:40 AM
@cↄ "SyntaxError: syntax error"
@cↄ 1
 
has awoken
 
@cↄ That's a bit better (assuming you're talking about the awfully named getStats), but then we get to defining what is a word: Is foo.bar 1 word, or two words? What about foo@gmail.com?
 
user1125394
!!> "ol'school".match(/\w+/g).length
 
@cↄ 1
 
yeah you didn't specify the global flag
 
8:42 AM
@cↄ 2
 
user1125394
hmm yea
 
!!should I waste the watching this anime or do something more useful
 
@Zirak do something more useful
 
okay...after this episode.
@OctavianDamiean You'd have liked it, she's in it.
 
@Zirak You need to provide another link. :/
 
8:46 AM
...well they're pretty dumb. Google for Yoko Littner
 
Google for Yoko Littner Cosplay
 
Oh my, some of them look delicious.
 
[x] would penis
 
She appears to me Ms. Fanservice
 
tl;dr, what's she come as?
 
8:52 AM
I'm only on episode 2, currently she's the plot catalyst - the stranger from a strange land, disrupting the regular, mundane flow of life.
 
episode 2 of what?
 
Gurren Lagann, known in Japan as , is a Japanese mecha anime television series animated by Gainax and co-produced by Aniplex and Konami. It ran for twenty-seven episodes on Japan's TV Tokyo between April 1, 2007 and September 30, 2007. It was directed by Hiroyuki Imaishi, written by veteran playwright Kazuki Nakashima and had been in development since the participation of the famed animator in the Abenobashi mecha themed episodes by the same studio. Gurren Lagann takes place in a fictional future where Earth is ruled by the Spiral King, Lordgenome, who forces mankind to live in i...
 
Yep, image looks mundane.
 
image looks awesome.
 
The one-box images are...weird
Evangelion's image is a race-car. wtf
 
user1125394
 
what did @rlemon ever do to you?
...don't answer that
 
user1125394
!!google most glorious gif of all time
 
user1125394
9:16 AM
!!should I be on your google black-list?
 
@cↄ Absolutely not
 
So I could login last night in node using http requests only. I could only log in to SO. I just need to know how a bunch of cookies are generated to have the global auth. I don't have the time to do it now, but there's not.much left tl do.
There's a lot more to it than copy's python script btw.
I'll push the script when I have the occasion so you guys can look at it, there's nothing too hard. It's just a bunch of requests to get the csrf, the cookies, etc. No need for user agent btw :-)
 
@FlorianMargaine Doubtful, copy's Python script works though. ;)
 
Not sure how honestly, having gone through all the hrtp requedts by hand
 
Well, he's doing a password login, not oath.
As far as I can remember.
 
9:26 AM
Yeah same
But it's still going theough openid
 
Then all that's needed is really just what's in his script, he can even post messages to chat with that.
 
(I'm on mobile, excuse my typos...)
The openid_identifier bit is kinda magic in his script
His request library does a lot more than simply http requesting then anyway
Because there are a bunch of ajax requests involved in the process that I didn't see in his script
 
Uhm, it's not doing anything special.
 
+ The requests he makes don't generate the gauth cookie
Trust me, I've read them :P
For example there's the form to login that you get through an xhr request. You need the form since it gives you the fkey
There's also another xhr request to get a nonce + token needed for openid that I didn't see in his script
 
I have a simple question (thought I knew this..!)
 
9:40 AM
It's why I find weird that his script works if the request lib only does http requests simply
 
@FlorianMargaine Then you didn't look close enough.
 
$(document).ready( function()
{

	var animObj = {}
 
How can I view this on the console? I thought this was a global variable that would be attached to the window?
 
9:42 AM
Because it's in a function?
or window.$ ...?
 
I guess myopenid is simpler than SE login then
 
hey! sorry, maybe this is an obvious question, but can I replace an array with another like this? : array1 = array2
 
Because you need an fkey for the login form too
@Atilla try it
 
well, it doesn't work, but if it's possible, I do wrong something else
 
@OctavianDamiean Just found this: stackoverflow.com/questions/13766371/… - seems it can't be done because of scope. I thought the local vars set by jQuery would be accessible somewhere using window.$.variableName - every day's a school day I guess...
 
user986408
9:52 AM
function() { /* hello scope */ }
 
Something I don't understand is how people can think you can sanely access a function's variable.
 
I have a question.. When ECMA6 is released. What if you start using the new syntax, and someone with an outdated browser comes along ?
 
I mean...a function can't be guruanteed to be ran at any point, and it can be run many times. If it was possible to do func.scope.someVar , which would it access?
@OliverSchöning Make a wild guess
 
@Zirak "Fuck you Granpa" or IF(OUTDATED).dothis
 
@OliverSchöning You transpile.
 
9:58 AM
@BenjaminGruenbaum Neat!
 
@Oliver you can't do "if outdated do this", the code would vause a syntax error and stop all execution in old browsers
 
Stupid SE chat highlighting code :P
@FlorianMargaine There's tab-completion of names btw
 
10:14 AM
@OliverSalzburg not on mobile.
 
10:25 AM
Can someone say me why this is not possible ? or is there any error
okay solved :D
var option = document.createElement("option"); I haven't added in for loop
 
10:38 AM
@FlorianMargaine Lol :)
i guess its true.
 
@OliverSchöning is it for me ?
 
then yes
I just spark in mind after the drop link :)
 
Nah mate. Just me being dumb not realizing something
 
okay :) :D
 
10:41 AM
@FlorianMargaine What I meant was: if(browser version) execute something That should work
 
@OliverSchöning It shouldn't, because syntax is checked before code is run
 
The browser first parses your js, then executes it
Yeah that ^
 
If you did conditional loading with something like yepnope, then it'd make sense.
But it implies writing (nearly) double the code. Just...don't.
 
Just use es6ify
 
I am going to google that. But I hope its a joke
o wait
I misread
@FlorianMargaine I thought you wrote IE6ify
.. lmao
I think we need a less attractive Bot for the Room. HAL was fitting in better :p
 
10:48 AM
Too distracting?
 
:p Not nerdy enough. If a women, I vote we change the bot to 7of9 xD
 
12 messages moved to Trash can
 
That's not the point.
 

« first day (1106 days earlier)      last day (3832 days later) »