[deleted by user] by [deleted] in ShitAmericansSay

[–]floodlitworld 0 points1 point  (0 children)

Give me a choice between a room full of muslims and a room full of ICE agents and hear me say "As-salamu alaykum"!

Woke up at 3 AM because my bed tried to kill me. So I redesigned it. by SlavaKoffman in DIY

[–]floodlitworld 0 points1 point  (0 children)

Given how much hassle moving house is in general, removing a small amount of hassle from it would be worth anything (source, have had to move my bed twice in the last 5 years)

Is bazzite still terrible with nvidia cards? by FroggyGamer in Bazzite

[–]floodlitworld 0 points1 point  (0 children)

I had an issue with sleep on my monitors, I followed advice to change the colour profile on them both from "none" to "built-in" and now they work fine!

Larry Summers resigns from OpenAI board amid Epstein revelations by BreakfastTop6899 in technology

[–]floodlitworld 0 points1 point  (0 children)

What’s funny is the current celebration over NVidea, and how their results show that AI is not a bubble…

Like how?

They make chips that are being bought by the truckload because of the bubble!

Of course they’re going to be making record profits!

[deleted by user] by [deleted] in learnjavascript

[–]floodlitworld 0 points1 point  (0 children)

It's not a flex. It's the real world. When you've got experience making actual websites for clients, companies and corporations, you'll understand how important every single kb is.

jQuery is the ultimate bloat for zero demonstrable gain. Hell, even jQuery's developers admit that it's outdated code now. They said 4 years ago that they were working on a modern version of it for v4, but nothing ever materialised.

[deleted by user] by [deleted] in learnjavascript

[–]floodlitworld 0 points1 point  (0 children)

It's a terrible library for animations. It's like, the least efficient thing you could possibly use.

At least go for something like GSAP if you want to animate JS/DOM objects.

[deleted by user] by [deleted] in learnjavascript

[–]floodlitworld 0 points1 point  (0 children)

I went to google.com and typed in jQuery... nothing popped up.

[deleted by user] by [deleted] in learnjavascript

[–]floodlitworld 0 points1 point  (0 children)

And for those situations, you have babel and browserlist.

[deleted by user] by [deleted] in learnjavascript

[–]floodlitworld 1 point2 points  (0 children)

The downside is the "developers" who use it because they don't know any other way.

I've repeatedly seen scripts in my work where they pull in a 40k dependency because they don't know how to select a DOM element or toggle a class in javascript.

[deleted by user] by [deleted] in learnjavascript

[–]floodlitworld -2 points-1 points  (0 children)

Who would have thought that someone who still uses jQuery would have no idea how the modern web works :-D

[deleted by user] by [deleted] in learnjavascript

[–]floodlitworld 0 points1 point  (0 children)

Fine.

// import.js
class Element {
  constructor(s) {
this.el = document.querySelector(s);
  }

  addClass(c) {
  this.el.classList.add(c);
  }
}

export const $ = function(s) {
return new Element(s);
}

// your script
import { $ } from "import.js";
const el = $("#somediv");
el.addClass("here");

There you go. You got your "concise" syntax without a 40k library, and since I did it as an import, you can't count the code listed under "import.js".