« first day (1993 days earlier)      last day (2969 days later) » 

mjr
7:00 PM
@JoJo how's this?
 
@rlemon Are you sure it should appear in the DOM?
 
@BenCraig looking now
 
content scripts will be injected and run for 404 responses that are HTML documents; it will not run for Chrome error pages like network failures
 
@mjr I actually.. do like the effect of the clear happening and then the value returning to 0, i may need to make it any previously saved good value..
 
it just never stops being funny
 
7:02 PM
@Shoe it should for sure be in the source tab
maybe that is an easier place to look
 
@mjr I like it a lot, thank you for the keyup idea
 
@Shoe goto the sources tab, then on the left switch to 'content scripts'
 
@rlemon Where exactly in the DOM of the source tab?
Ok, let me try
 
should be here
sans ofc the dark theme which I dont' expect you to have :P
 
mjr
@JoJo it seemed very awkward before, hope it works out now
 
7:05 PM
Yup
 
@mjr yes thank you
 
It's right there at the bottom
 
starting to use event handlers as staples finally now that I dont have to code for IE9 anymore
 
@Shoe add a bunch of console.logs and see where it isn't running?
when all else fails.. litter with logs :D
2
Q: Ajaxurl return 0

user1869391Im making a wordpress plugin which allows the admin delete a particular row in the database by clicking a button <td> <img src="/DeleteRed.png" onclick="deleteRow(<?php echo $rowa->id?>)"><br> </td> Initially I was calling ajax like this function deleteRow(val) { var url = "id="+val;...

this error looks like it has nothing to do with ajax, or javascript
 
The very first thing in the script is this
 
7:07 PM
@Shoe move that log outside of the window.onload
 
And I never see the "Load happened" message
 
could be the onload event is never thrown
 
something overriding it?
 
which is weird, but true if your run_at is document_end or soemthing
@KevinB or the script is included post load event
 
@rlemon That seems to be the case
Now it shows (when the console.log is outside).
 
7:09 PM
@Shoe I had a similar loading issue on one of the chat extensions :/ It SOMETIMES threw the load event
my solution was to check if the element I needed existed, if not wait for load
if it did just run the init
 
@rlemon Sometimes is even worse than never.
 
if( !document.getElementById('form') ) {
  window.onload = init;
} else {
  init();
}
ugly as sin
but it seemed to work
 
Wait
 
the other solution is to make the script include at document end, then you are certain the HTML is parsed
 
If the content script is always reloaded in said case...
 
7:11 PM
(then you don't wait for onload)
 
The maybe I can get away with just init() there?
 
@Shoe depending on what you do in the DOM, and where the script is included. yes
 
Let me try
 
<script>document.getElementById('foo');</script>
<div id="foo">I will not work as expected, dom parses top to bottom</div>
<!-- but below, it will -->
<script>document.getElementById('foo');</script>
 
Nope
It's not reloaded every time
 
7:13 PM
well duh. it isn't a content script :P you are injecting it yourself.
 
But why is it a problem of the DOM loading?
 
@mjr I guess minId.keyup is not a function?
 
sorry I've been half mentioning that all along
 
Oh boy :P
 
.. or i need to maybe wait till $(window).load()
 
7:14 PM
    "content_scripts": [ {
        "js":        [ "content.js" ],
        "matches":   [ "https://www.example.com/*"], // accepts wildcards and shit
        "run_at":    "document_end" // forces the script to inject at the end of the document. no waiting for 'loading' events
    } ]
is how I would do it from the manifest.json page
 
mjr
@JoJo sure it is, API doc
 
Ok, maybe I can make it run every time per domain
It will just fire events at random
And the background script will ignore them
 
mjr
yes it does need to be in doc.ready
 
I think matches takes regexp
so you can filter specifically to whatever you like
 
ya in doc.ready..
but no luck in the actual app, thanks for the fiddle though!!
 
7:15 PM
 
@rlemon OMG it worked
It's sending the messages
 
\o/
 
IT'S ALIVE
Nice, thank you
That's a giant step forward
 
a giant leap for mankind
Fun fact: Neil Armstrong messed up his line, and realized it awkwardly halfway through.
 
@KendallFrey it's hard to do drugs on the moon, man
 
7:19 PM
you kidding me? have you seen all that powder?
the moon is MADE of drugs
 
but you're stuck in a hat
 
@KendallFrey I've always read (as quoted from Neil himself) that the transmission was just dodgy. the line was "that is one small step for a man... one giant leap for mankind."
but no one heard the 'a'
 
Could be
there is a really long awkward pause though
 
also, that would have had to be a bloody quick "a"
 
7:22 PM
idk. seemed on par with the awkward pauses in all of their transmissions
I assumed it was something to do with lack of breath due to the space suits and work involved
 
still think he flubbed his line
Fun fact: space suits aren't pressurized to anywhere near atmopheric pressure
 
@KendallFrey you try being the first person on a different ground and not screwing anything up
 
Hey, all respect
that was like the best thing he could have screwed up
 
you have no respect for space, Kendall
you've killed so many kerbals you just take it for granted now
 
i have respect for all the space in your mom's [redacted]
 
7:25 PM
@KendallFrey shame you can't fill a statistically significant portion of it
 
I wonder how they got past the van allen belt since the Orion engineers are trying to figure out how to get past that radioactive belt that would fry a mans brain
 
@ssube put a positive spin on it. my p-value is pretty damn high
@JoJo just do it quickly
 
@JoJo with a spazzsheep
 
haha
 
they've got walls, yknow
 
7:29 PM
made of lead maybe?
 
4
Q: How did the first US manned Moon mission suits block radiation?

VolomikeHow did the first manned Moon mission spacesuits block the deadly radiation of both Van Allen belts and direct sunlight?

 
!!afk brains gotta poop.. still
 
7:55 PM
pro tip: April Fool's game responds to the Konami Code (followed by the Enter key)
 
is there any regex master around, please?
 
!!welcome
 
@KevinB Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
 
@KendallFrey > Pleasedon't ask
fix it
 
7:59 PM
Why me?
It bugs me just as much as it bugs you
 
you made it
I've never noticed before I installed your plugin
 
can anyone explain me why my regex didn't match '#comment', '#one' or '#is'? All I want is to select all the comments, but not hashtags prefixed with \ :(
 

« first day (1993 days earlier)      last day (2969 days later) »