mstdn.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A general-purpose Mastodon server with a 500 character limit. All languages are welcome.

Administered by:

Server stats:

12K
active users

#js

10 posts10 participants1 post today

Wer oder was ist JavaScript, und warum muss das an die Leine?

JavaScript ist eine Scriptsprache, mit der Websites in ihren Funktionen aufgehübscht werden. Die Website und die von ihr aufgerufenen "Partner"-Domains senden Befehle als JS, der Browser führt sie aus. In vielen Fällen ist das überflüssiger Augenzucker, in manchen sogar gefährlich; für bestimmte Aufgaben allerdings (z.B. hierarchische Auswahllisten) ist notwendig, dass der Browser JS ausführt. Deshalb ist eine feinkörnige Steuerung der Erlaubnis für JS angebracht. JS soweit wie irgend möglich verboten zu halten (bei NoScript STANDARD oder MISSTRAUEN), schützt gegen

pc-fluesterer.info/wordpress/v

www.pc-fluesterer.infoWer oder was ist JavaScript, und warum muss das an die Leine? | pc-flüsterer bremen

Umgang mit verseuchten Websites: NoScript

Manche Websites sind völlig verseucht mit Scripten von „Partnern“, die verfolgen und werben möchten. Solche Websites sind nur mit einer Browser-Erweiterung erträglich, die JavaScript (JS) bändigt. Dafür verwende ich NoScript. Damit ist im Standard JS blockiert. Leider gibt es immer mehr schlecht programmierte Websites, die ohne JS-Erlaubnis gar nichts anzeigen oder nur einen Teil, oder die Darstellung ist verhunzt. Dann entscheide ich: Ist mir der Besuch der Website so wichtig, dass ich der Basis-Domain JS erlaube, oder kann sie mir gestohlen bleiben?

pc-fluesterer.info/wordpress/v

www.pc-fluesterer.infoUmgang mit verseuchten Websites: NoScript | pc-flüsterer bremen

[Перевод] Мощь Intl API: подробное руководство по встроенной в браузер интернационализации

В двух словах: интернационализация — это не только перевод текста. Она включает в себя форматирование дат, правильное образование множественного числа, сортировку имен и многое другое с учетом конкретных локалей. Вместо тяжелых сторонних библиотек современный JavaScript предлагает Intl API — мощный встроенный инструмент для работы с i18n. Еще одно напоминание о том, что веб действительно глобален. Существует распространенное заблуждение, что интернационализация (i18n) сводится лишь к переводу интерфейса. Перевод, конечно, важен, но это лишь одна из частей. Настоящая сложность — в адаптации информации под культурные особенности .

habr.com/ru/companies/timeweb/

ХабрМощь Intl API: подробное руководство по встроенной в браузер интернационализацииВ двух словах: интернационализация — это не только перевод текста. Она включает в себя форматирование дат, правильное образование множественного числа, сортировку имен и многое другое с учетом...
#javascript#js#intl

I like this quote. There is so much meaning in it.

“People are getting sick of frameworks. All the JavaScript frameworks are so… what do you call it, like [un]wieldy. It takes so much work to just maintain this code, and then it updates to a new version, you need to change everything. PHP just stays the same and works.”

thenewstack.io/developers-rail

The New Stack · Developers Rail Against JavaScript ‘Merchants of Complexity’When both Pieter Levels and Alex Russell convincingly argue against using complex JavaScript frameworks, maybe frontend devs should listen.
#php#js#javascript
Replied in thread
Uhm... Tavis Ormandy works for Google, that is responsible of some of the aggressive crawlers Anubis try to block.

Whatever he writes on his blog should be read within such cultural frame.

Maybe they will soon enable #JS execution in crawlers, but if Anubis get massive adoption, #AI crawling will becomes much more expensive. Consider they will also have to avoid smarter guys trying polluting their models. So all, in all, I still think Anubis is a good idea.

Also, if they enable JS in the crawlers, I'm going to turn them into #bitcoin miners.
That might the very first use case for a #cryptocurrency since 2008!

I'm notoriously a #blockchain mocker, considering the whole technology stack as a large-scale scam-factory framework.
But getting money out of #Google, #Amazon, #Facebook and similar #BigTech might be the very first legit and useful use case for a miner since bitcoin invention.

CC: @Scmbradley@mathstodon.xyz @lindsey@recurse.social
lock.cmpxchg8b.comWelcome.

Coming soon (likely this afternoon, I’m writing tests and docs and updating examples as we speak)…

This is the sort of thing you’ll be able to do with Markdown pages. Just pop any arbitrary JavaScript you want in the new script block in the front matter and then import and use components as well as plain old JavaScript tagged template variable interpolation (not shown in this example) inside your Markdown.

The screen has all the code (sans the end of the last line of CSS and the closing tags for the <style> and <div> in the Reactions component, which I couldn’t make fit without reducing the font size) for the example you see in the browser with functional buttons that persist their state to Kitten’s built-in default database.

When I say all the code, I mean all the code. There is no scaffolding. Those two files are the only two files in the project.

kitten.small-web.org

I was surprised that Prettier only recently added a change that I considered a standard behaviour — format operators at the beginning, similar to commas, so commenting out a line won't lead to syntax errors #js #prettier #frontend #webdev

prettier.io/blog/2025/02/09/3.

prettier.io · Prettier 3.5: New objectWrap option, experimentalOperatorPosition option and TS config file support! · PrettierThis release includes a lot of bug fixes and the following new features:

I've been making spelling / #maths exercises for the kiddos with fireworks, confetti, video, stickers and now #TTS to read out the maths problems and help memorise the times table!

codeberg.org/csirmaz/learning-

Sneakily introducing them to variables and symbolic algebra, too.

Feel free to take the components and build your own exercise system or update the problems to fit your needs.

Summary card of repository csirmaz/learning-aid
Codeberg.orglearning-aidReusable web-based tools to help KS1 and KS2 children with skills (maths, spelling, etc.)

20 частых антипаттернов в React и как их исправить: кратко, понятно, без мифов

20 частых антипаттернов в React и как их исправить. Разбираем ошибки с хуками, состоянием, мемоизацией и структурой компонентов: когда не нужен useEffect, зачем useCallback, почему не хранить производные значения в state. Минимальные примеры, чёткие принципы, практичные альтернативы.

habr.com/ru/articles/937656/

Хабр20 частых антипаттернов в React и как их исправить: кратко, понятно, без мифовReact обеспечивает предсказуемость и прозрачность UI при условии соблюдения его модельных ограничений: однонаправленный поток данных, детерминированный рендер на основе props и state, а также явное...