Hacker News new | past | comments | ask | show | jobs | submit | r14n's comments login

I get a reference error when I try this (chrome stable on linux)


Ah, thanks for the heads-up, apparently there is something borked in Chromium wrt $ / $$ encapsulation, as it seems they are nor reachable from the (global) context setInterval so doing `window.$ = $; window.$$ = $$;` fixes that in Chrome. Not sure why. (Yet again embarrassed myself by trying a snippet that "simply must work ® according all documentations ™" in single a browser only before posting. Sigh.)



I bet it's working as intended. The $ symbol is probably a special feature of the console and is not intended to be a property of window. Inside setInterval, the function is no longer being executed in the special console environment, which has access to that symbol.


Yes, I guess there could be some intention behind that, presumably some security precautions, but still: the fact that you can see $ in the globalThis (as a non-enumerable prop), and that globalThis you see from inside the timeout-ed function is strictly equal to globalThis seen directly from the console, that makes it somewhat spooky.

    console.log(Object.getOwnPropertyDescriptor(globalThis, '$'))
    // {writable: true, enumerable: true, configurable: true, value: f}
    globalThis.globalThat = globalThis
    globalThat.$ === globalThis.$
    // true
    setTimeout(()=>console.log(globalThis.globalThat === globalThis))
    // true
    setTimeout(()=>console.log(Object.getOwnPropertyDescriptor(globalThis, '$')))
    // undefined (!)
    $ = $
    setTimeout(()=>console.log(Object.getOwnPropertyDescriptor(globalThis, '$')))
    // { writable: true, enumerable: true, configurable: true, value: f}
And it (`setTimeout(()=>{console.log(typeof $==="function")},0)`) works in Firefox. (Interestingly, you cannot get $'s descriptor in there, but you have it always available in timeout.)


Was closed as "Infeasible", i.e. wontfix.


Are you a high school English teacher?


This is one reason HN is such a nice place to be. Thank you. (Im not being sarcastic here)


I'm not high. What are you implying?


Is there a way to SEE the location of my Apple manufactured Airtags from Android?


Is this a ChatCPT written article to sell stuff or for SEO purposes? Definitely seems like it, and actually makes me wonder about the entire parent post.


I wrote my post with my own two thumbs, thank you.

The site linked looks like one of those stupid content farms that analyzes popular crap on Reddit. The stairs in the woods thing got popular because they are out there, but the is not supernatural - people just abandon or recycle material within structures in remote places if it no longer suits their purpose. Decking and stairs are often made of pressure treated wood which does not burn or decay as quickly and if they are concrete, they most definitely will not decay in a hurry. So once the combustible tinderbox of a log cabin is consumed or is recycled (via dismantling) all that is left is often just stairs.


Yea, I see more and more of these content farms when I'm googling various topics as well, which is actually making using the internet to learn how to do things less productive.

Your post overall was not written in that manner, but the tangent into the stairs thing was unexpected and borderline supernatural, actually would have been an interesting segue into a ghost story.

@influx post is so low effort it's hard to tell if they're the one profiting from the content farm or just posted up the first result he found on a quick google search.


I use HN Digest and get an email with the top 20 (the number is configurable) stories from the previous day in my email each morning. I stay relatively up to date with less distraction.


Would sure be nice if FF was more timely about supporting MV3. The worst part is it looks like they won't be supporting service workers which is what Chrome decided to replace background pages with. Meanwhile devs are stuck maintaining two different versions.



I beat it :)


Awesome! Thank you for playing!


Me too


The marketplace did not fail. The Chrome Web Store lives on - it's just the PAYMENT section of it that fails. All the extensions will still exist and be available for download, we devs just can't use Google's payment or subscription service anymore.

So if a dev has thousands subscribers paying monthly through Google's system, they will all have to sign up again with a new payment processor - there is no way to migrate the payment info, only the license info.

And yes Google takes a cut each month so it's hard to imagine why they have decided to forgo these millions of dollars and at the same time hurt extension devs - because I can imagine a very large number of people deciding not to resubscribe :(


Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: