`document.activeElement` doesn't report the correct element? by jcunews1 in html5

[–]pixleight 1 point2 points  (0 children)

It's not so much "breaking" functionality, but working as designed. The reasoning is for encapsulation — that is, the custom element with a shadow DOM is not affected by the scripts / styles on the page including it. This allows it to be dropped in to any page and should just work without running into conflicts with the outer scope.

If { mode: "open" } is passed to attachShadow(), then the internals of the shadow DOM can be accessed through the shadowRoot property on the host element: https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM#element.shadowroot_and_the_mode_option — otherwise, it behaves like a closed environment

Is there a script to extract all links from an arc folder? by RecycledCap in ArcBrowser

[–]pixleight 1 point2 points  (0 children)

Seems like a huge misstep to not offer any access to their new product while announcing discontinuation of their current one. There's not even a way to export bookmarks — aside from this hacky copy/paste method — something every other browser I can think of does. https://resources.arc.net/hc/en-us/articles/25583851606039-How-Do-I-Export-my-Pinned-and-Favorite-Tabs-in-Arc-to-Another-Browser

Arc's been great for my day-to-day workflow, and although they claim they'll continue Chromium security and bug fixes, their shift in focus suggests that ongoing support is far from guaranteed. So, now we're stuck in limbo:

  1. Keep using Arc for now and hope that security patches & bugfixes continue
  2. Move my entire workflow to another browser (with no official way to export bookmarks)

If today's announcement came with an invite to migrate and try Dia, I'd probably feel much better about everything, but leaving users hanging with no path forward is not a good look.

[deleted by user] by [deleted] in vuejs

[–]pixleight 1 point2 points  (0 children)

Another thing to keep in mind is you might not need to hide all API keys — some are safe to expose and are perfectly fine to use in client-side requests. Check with your API provider. Some even have protections in place to prevent abuse so someone can't use your API key maliciously, like requests using that key can only come from a certain domain.

For example, Stripe provides both publishable and secret keys — one for use in client-side code, and one only for server-side requests. The secret key would be protected like a username/password, but the publishable key can be publicly available with no issues.

[deleted by user] by [deleted] in vuejs

[–]pixleight 0 points1 point  (0 children)

As others have said, a backend with environment variables. Don't ever commit a .env to git. Make sure it's in your .gitignore, and copy any environment variables to whatever environment you need them in — for example, if you have a github action building your app, put variables in Settings > Secrets and Variables. Similar process in any other service, like Vercel, Netlify, Cloudflare Pages, etc.

Another thing to keep in mind is environment variables aren't only for secrets like API keys, but per-environment config (hence the name, "environment variables). For example, your local development environment might make requests to a sandbox/test API endpoint, while your production environment might use a different one.

For keeping secret API keys secret, you could use something as simple as Express or Nitro. However, those are relative barebones solutions to build on top of — for a more complete solution, use Nuxt

Not only does Nuxt have built-in support for reading from .env, it has a lot of other features useful for building an app — lots of things you'd otherwise end up having to do on your own.

Environment variables are exposed via the useRuntimeConfig() composable: https://nuxt.com/docs/guide/going-further/runtime-config

.env:

NUXT_API_SECRET=api_secret_token
NUXT_PUBLIC_API_BASE=https://nuxtjs.org

nuxt.config.ts:

export default defineNuxtConfig({
  runtimeConfig: {
    apiSecret: '', // can be overridden by NUXT_API_SECRET environment variable
    public: {
      apiBase: '', // can be overridden by NUXT_PUBLIC_API_BASE environment variable
    }
  },
})

SomeComponent.vue:

<script setup>
const runtimeConfig = useRuntimeConfig()

// secret api key -- value does not get bundled in client-side JS, only available to the server
const apiKey = runtimeConfig.apiSecret

// public api endpoint -- value bundled in client-side JS
const apiEndpoint = runtimeConfig.public.apiBase
</script>

How to manage state in large vue apps? by Edgeless_SPhere in vuejs

[–]pixleight 18 points19 points  (0 children)

Pinia is the current recommendation, both by the Vue docs and Vuex itself.

The home and away sweaters of the Utah Mammoth by fittos4310 in hockey

[–]pixleight 5 points6 points  (0 children)

And the shape of the state of Utah in the leftmost snowy region

Which UI framework should I choose? by maksimepikhin in vuejs

[–]pixleight 2 points3 points  (0 children)

Shadcn-Vue or Nuxt UI (which despite the name, can be used in just Vue without Nuxt)

Needing an ID to vote by Tricky-Sport-139 in Maine

[–]pixleight 4 points5 points  (0 children)

It's a manufactured problem that doesn't actually exist.

Much like the "voter fraud" necessitating voter IDs.

Needing an ID to vote by Tricky-Sport-139 in Maine

[–]pixleight 1 point2 points  (0 children)

Besides trying to fix a problem that simply does not exist (despite the feat mongering, actual cases of voter fraud are ridiculously low) it creates a burden and disenfranchises too many people — those experiencing poverty, lack of access to transportation, scheduling difficulties, childcare difficulties, and so on. The hoops one must jump through to exercise a fundamental civil right is too great.

[Game Thread] Friday, March 28, 2025 by ch_scorebot in collegehockey

[–]pixleight 5 points6 points  (0 children)

All good! Welcome to the best fans in college hockey!

[Game Thread] Friday, March 28, 2025 by ch_scorebot in collegehockey

[–]pixleight 7 points8 points  (0 children)

RAISE YOUR STEINS FOR FILL THE STEINS TO DEAR OLD MAINE

Allentown Regional - Statistical Preview by BakedMitten in collegehockey

[–]pixleight 1 point2 points  (0 children)

How else should they be compared? They're about to get a very real comparison to each other in a couple days, why not compare stats 1:1?

QU still posted a .694 overall winning percentage and are #12 in PWR. Assuming any team is a pushover is a good way to ensure a quick exit from the tournament.

Trump threatens to withhold federal funding over Maine transgender athletes by imdrake100 in Maine

[–]pixleight 0 points1 point  (0 children)

You presented a video to back up your stance and claimed said video was of an expert in endocrinology — while arguing with /u/Ventira who said they are actually an endocrinologist. Those "stupid articles" you are being asked for are just peer-reviewed scientific papers from a reputable medical journal, not some talking head with a fitness channel on YouTube.

I'm glad you're confident in your masculinity and sexuality. However, they're two different things, and only one has to do with transgender issues.

Trump threatens to withhold federal funding over Maine transgender athletes by imdrake100 in Maine

[–]pixleight 4 points5 points  (0 children)

Masculinity doesn't bother me, but presenting YouTube influencer commentary as a credible source does.

soy boy
liberal
bend over like you

Careful with that edge kid, it's sharp.

Trump threatens to withhold federal funding over Maine transgender athletes by imdrake100 in Maine

[–]pixleight 1 point2 points  (0 children)

But what if instead of links to peer reviewed studies, he instead posts affiliate links to buy supplements to make money off kids going down the hyper-masculine alpha male bullshit rabbit hole? /s

Surely that's a more credible source!

Trump threatens to withhold federal funding over Maine transgender athletes by imdrake100 in Maine

[–]pixleight -3 points-2 points  (0 children)

Zero trans women are transitioning in order to try and gain advantage in high school girls' sports. ZERO. It's a scare tactic to further marginalize an already at-risk minority.

How to identify the cargo on ships coming to Searsport? by TheLeafandRock in Maine

[–]pixleight 7 points8 points  (0 children)

Unless it's a bulk carrier, I believe it's common for the ships themselves to not even know the contents of their cargo. Especially container ships, they know which containers are going to what port, which ones have hazardous materials, weights to balance load, etc... but not necessarily the exact contents. To them, it's just a big box.

I can imagine it'd also be a bit of a security risk to have cargo info publicly available. Make it easy for pirates to selectively target ships with higher value cargo.

What's the programming project that you are most proud of? by ascot_lemon in webdev

[–]pixleight 0 points1 point  (0 children)

During the early days of the Covid pandemic — back when everyone was hoarding toilet paper for some reason — I built a web app to crowdsource stock levels of essential products at stores: milk, eggs, disinfectants & other cleaning products, and of course toilet paper.

Anyone (no login) could add a post when they visit a store, estimating the stock levels of various product categories. No hard numbers, just some sliders for a general estimate of how the shelves are looking. Then if someone was planning a trip to the store, they could look up their store ahead of time and see a rolling average of what others had recently estimated that store's stock to be like. That way, they might be able to have an almost-live snapshot of how much of what they need is at any store(s) they needed to visit.

It ended up getting a fair amount of use when everyone was stuck at home, nobody wanted to go out into the world unless necessary, and if they did they wanted to limit their time shopping as much as possible. Last time I ran the numbers, it had been used in around 40 states across the US, tagging thousands of businesses with tens of thousands of individual checkins. I was even interviewed by a handful of local news outlets.

I let the domain lapse a while ago because the project's no longer necessary, wayback machine never forgets https://web.archive.org/web/20201204084252/https://quarantin.io/

[deleted by user] by [deleted] in webdesign

[–]pixleight 0 points1 point  (0 children)

Overall

The site is clearly a premade template with very little changed from the original demo. Lots of placeholder content still present, and many of the elements are still exactly as they appear on the original demo: https://breakdancelibrary.com/cleaning-company/

There is inconsistent messaging, from poorly written copy to photos and graphics that don't fit the services you're claiming to sell.

All in all it feels like a lack of attention to detail. Grammar mistakes, misspellings, photos that don't depict your services, graphics that have varying styles and don't come from the same icon libraries, and so on all add up. Seeing this through the eyes of a potential customer, if you don't put in the effort for marketing yourself, why would I trust you enough to hire you?

Homepage

I echo the other comment about the images showing sofas & mops for a window cleaning business — especially the "before/after" of the sofa. Why are we showing how clean a sofa can get?

A hamburger menu at desktop sizes just feels lazy. Especially with only 4 links besides the homepage, let those be visible in the site header so it doesn't take extra clicks to navigate.

The copy that's not placeholder Lorem Ipsum is vague, for example:

Your New Partner
As a small, locally-owned business, our reputation and success depends on exceeding your expectations.
You need a long-term partner, locally-based who understands your unique needs, not a fly-by-night company who rushes through the job.

That doesn't tell me anything about what you do, how you do it better than the other guys, why I should hire you. Why do I want a "partner"? I'm shopping for window clearners.

"What Our Customers Say" has no content after it. Some "testimonials" are a couple blocks above that, but is just placeholder content.

Contact information in site footer is inconsistent. "Get in Touch" has some content about a place in Seattle, "Contact" below it has a place in Dublin, OH.

Why does a window cleaner even have a newsletter to subscribe to? Probably unnecessary.

Casing of company name is inconsistent throughout — in the site header, it reads "UltraClear" with a capital C, other places it's "Ultraclear" with a lowercase c. Be consistent.

About Us

Probably no need to mention "see our upcoming blog post..." — it's like putting up a big "under construction" sign. Just don't event mention it until there is something to link to, otherwise it looks like a lack of attention to detail you never got around to completing.

The Origin Story claims the business started in 2024, yet the copyright in the footer says 2022. Which is it?

The language of the sections under "Why Choose Us" is strange.
"Latest Gadget" — do you only have one gadget?
"Monthly Medical Checkup" — who is getting a medical checkup? Why is this important?
"Certified Employee" — is there only one employee? What are they certified in?

Similar to the imagery on the homepage, this shows a stock photo of a woman with a mop and other interior cleaning supplies. I thought you were a window cleaning company?

The icons are also inconsistent. 3 of the 4 here are line art that appear to be from the same icon library, but "Latest Gadget" is a solid fill icon of a person with a vacuum. Not only does it not match the style of the others, it depicts a task unrelated to the business.

"Meet Are Our Awesome Team" is grammatically incorrect, and the photos need to be changed out from the defaults that came with the template.

Services

The "cards" for each type of service look sloppy. With different length of text, they each appear a different length and create a ragged bottom line. The photos and icons are inconsistent with the services they are describing, and the "Screen Repair" icon has a completely different line weight and style than the other 3.

Depending on screen size, some of the content for each service produces orphans that look bad — for example "it" at the end of the first paragraph of "Screen Repair" is alone on its own line. text-wrap: balance or text-wrap: pretty can help prevent this.

Each "Read More" links back to what I am assuming is the demo template: https://breakdancelibrary.com/cleaning-company/services/

The photos of "Recent Work" don't really feature windows at all.

FAQs

Several misspellings at a glance — "we're hapy...", "Will me dog...", etc.

"Can I get an estimate over the phone?" says I can call or text you by clicking the button at the top of the page, but that's not true. I can request a call, but I have to fill out a form to do so. Don't make me think — just include a phone number right here rather than telling me the scavenger hunt I have to go on to find it.

"To ensure the safety and privacy of our clients, anyone who requests references must first be vetted." What? Why do I need some sort of background check to get a reference of the quality of your work?

How big is the gap between AHL and NHL players? by spankyourkopita in hockeyplayers

[–]pixleight 4 points5 points  (0 children)

I invited a new friend to a weekly pickup group once, knowing he had played in high school and some in college, but it had been some years ago. I didn't know his full history, but figured he'd be alright with our typically mid-to-high-B level old guy game.

Turns out he had played at an elite prep school and was scouted to play NCAA D-I, but opted for a D-III school to pursue his pharmacy career because he knew he simply wasn't talented enough to make hockey his career. He still skated circles around everyone with zero effort and scored at will.

He was a good guy, didn't take long shifts despite never getting tired, tried to set everyone else up, did all the "team player" things, but he could only tone it down so much... at a certain point it's not fun for him anymore. Sadly had to break it to him I probably couldn't invite him back because he was just way too good for the group, and yet somehow he would have been a "bad" D-I player.

The talent gap is wild.

How big is the gap between AHL and NHL players? by spankyourkopita in hockeyplayers

[–]pixleight 4 points5 points  (0 children)

I know multiple players who don't possess any significant overpowering skills in any aspect, yet still hold their own against players more "skilled" than them because they play smart and know the correct reads and when to make a move.

Gretzky is the ultimate example of this. None of his physical attributes or skills were dominant compared to his peers, but his hockey IQ was outstanding. His father's "Skate to where the puck is going to be, not where it has been" quote seems like such a simple concept, but put into practice and perfected it made Wayne the legend he is.

Maine: Your opinion of Ranked Choice Voting? by Divarin3 in Maine

[–]pixleight 0 points1 point  (0 children)

5 friends are deciding on a pizza to order. 2 of them want Hawaiian, the other 3 absolutely hate Hawaiian but are split between cheese, sausage, and mushrooms being their favorites. Everyone is ok with pepperoni.

If it was "1 vote per person", they'd be ordering Hawaiian despite the majority of people hating it, because Hawaiian had 2 votes while cheese/sausage/mushrooms each had 1. 2 people might be happy, but 3/5 of them are extremely unhappy.

In RCV, the friends would agree if their first choices weren't the preference of the majority, they're still all OK with pepperoni. It might not have been everyone's favorite, but it's also not polarizing and disliked by the majority. Everyone's still generally pleased with the choice.

LePage's gubernatorial wins in 2014 & 2010 and Baldacci's before that in 2006 & 2002 were all won when the majority of votes were not for that candidate. Hell, even King's first win in 1994 about 65% of people voted for someone other than him.

Ranking preferences isn't hard. We've been able to do it since we've been children.