#HTML5

2025-05-16

๐Ÿ› ๏ธ Title: Phaser
๐ŸฆŠ๏ธ What's: A libre Javascript framework for developing HTML5 games for PCs, mobiles & browsers
๐Ÿก๏ธ phaser.io/
๐Ÿฃ๏ธ github.com/photonstorm/phaser
๐Ÿ”– #LinuxGameDev #Programming #Framework #HTML5
๐Ÿ“ฆ๏ธ #Libre #SRC #Bin
๐Ÿ“– Our entry: lebottinlinux.vps.a-lec.org/LO

๐Ÿฅ๏ธ Update: 4.0.0 RC 3
โš—๏ธ Signific. vers. ๐Ÿฆ๏ธ
๐Ÿ“Œ๏ธ Changes: github.com/phaserjs/phaser/rel
๐Ÿฆฃ๏ธ From: ๐Ÿ›œ๏ธ github.com/photonstorm/phaser/

๐Ÿฆ‰๏ธ youtube.com/embed/jHTRu4iNTcA
๐Ÿ•ฏ๏ธyoutube.com/embed/0qtg-9M3peI
๐Ÿ•ฏ๏ธ[fr] youtube.com/embed/sUkcd0Rrpis
๐ŸŽฎ๏ธ youtube.com/embed/gnfgwkVg7vc

๐Ÿ•ถ๏ธ The project icon

๐Ÿ“š๏ธ Phaser is a fast, fun, libre, multi-platform Javascript framework for developing HTML5 games for PCs, mobiles and browsers. It offers WebGL and Canvas rendering on desktop and mobile web browsers. Games can be compiled on iOS, Android and native applications using third-party tools. You can use JavaScript or TypeScript for development. It is used by thousands of developers worldwide. Phaser Editor is a commercial product designed to create games using the libre Phaser framework.
Claudio Piresclaudiocamposp
2025-05-15

Marvel Vertical Menu WordPress Theme - Premium site builder tool with stacks of layout designs, user-friendly Theme options and rich drag & drop content builder to help create your perfect vertical menu site in minutes visualmodo.com/theme/marvel-ve Take your website to the next level! ๐Ÿ’ป๐Ÿš€๐Ÿ“ฑ

Posting in case this helps someone else.

For the last month or two, I've had problems visiting some sites with #Firefox. The sites use #Cloudflare, and it would give the "prove you're a human by checking this box" prompt. I'd never had problems with this before.

Suddenly that started failing consistently. Clicking the box would do something, but then just reload the challenge. There was no way to pass it. I tried reconfiguring and even disabling the "uBlock Origin" extension, cookie policies, other things - no luck.

Based on a comment on this discussion:
ask.metafilter.com/385480/fixi

... I tried disabling the "Disable HTML5 Autoplay" extension, and ... fixed! That was *not* an obvious candidate for causing the problem, unlike adblockers etc.

So it appears Cloudflare changed their in-browser testing JS such that it requires HTML5 autoplay to pass the check. Which is ... special. I can think of lots of people with very good reasons to have that disabled.

Anyways, I hope this helps someone.

#browser #check #BrowserCheck #human #robot #ProveYoureHuman #AreYouHuman #fail #blocked #website #protection #HTML5 #autoplay #extension #BrowserExtension

Claudio Piresclaudiocamposp
2025-05-14

Rare WordPress theme is all about building unique, creative and professional websites through industry-leading options network without having to touch a line of code visualmodo.com/theme/rare-word Our amazingly flexible network of options is paired with an easy to use interface that allows anyone from beginner to advanced build beautiful, responsive websites ๐Ÿ“ฑ๐Ÿ’ป๐Ÿ–ฅ๏ธ

Claudio Piresclaudiocamposp
2025-05-11

Gym WordPress Theme - Choose a WordPress theme that works! build any gym site design without code knowledge - Gym & Fitness WordPress theme - clean, modern, responsive, minimalist, sportive multi-purpose and strong visualmodo.com/theme/gym-wordp
Build your responsive website with a Visualmodo page builder! โ›น๏ธโ€โ™€๏ธ๐ŸŠโ€โ™‚๏ธ๐Ÿšดโ€โ™‚๏ธ๐Ÿ†๐Ÿ‹๏ธโ€โ™€๏ธ

Terence Edenโ€™s Blogblog@shkspr.mobi
2025-05-09

Stop using preg_* on HTML and start using \Dom\HTMLDocument instead

shkspr.mobi/blog/2025/05/stop-

It is a truth universally acknowledged that a programmer in possession of some HTML will eventually try to parse it with a regular expression.

This makes many people very angry and is widely regarded as a bad move.

In the bad old days, it was somewhat understandable for a PHP coder to run a quick-and-dirty preg_replace() on a scrap of code. They probably could control the input and there wasn't a great way to manipulate an HTML5 DOM.

Rejoice sinners! PHP 8.4 is here to save your wicked souls. There's a new HTML5 Parser which makes everything better and stops you having to write brittle regexen.

Here are a few tips - mostly notes to myself - but I hope you'll find useful.

Sanitise HTML

This is the most basic example. This loads HTML into a DOM, tries to fix all the mistakes it finds, and then spits out the result.

 PHP$html = '<p id="yes" id="no"><em>Hi</div><h2>Test</h3><img />';$dom = \Dom\HTMLDocument::createFromString( $html, LIBXML_NOERROR | LIBXML_HTML_NOIMPLIED , "UTF-8" );echo $dom->saveHTML();

It uses LIBXML_HTML_NOIMPLIED because we don't want a full HTML document with a doctype, head, body, etc.

If you want Pretty Printing, you can use my library.

Get the plain text

OK, so you've got the DOM, how do you get the text of the body without any of the surrounding HTML

 PHP$html = '<p><em>Hello</em> World!</p>';$dom = \Dom\HTMLDocument::createFromString( $html, LIBXML_NOERROR , "UTF-8" );echo $dom->body->textContent;

Note, this doesn't replace images with their alt text.

Get a single element

You can use the same querySelector() function as you do in JavaScript!

 PHP$element = $dom->querySelector( "h2" );

That returns a pointer to the element. Which means you can run:

 PHP$element->setAttribute( "id", "interesting" );echo $dom->querySelector( "h2" )->attributes["id"]->value;

And you will see that the DOM has been manipulated!

Search for multiple elements

Suppose you have a bunch of headings and you want to get all of them. You can use the same querySelectorAll() function as you do in JavaScript!

To get all headings, in the order they appear:

 PHP$headings = $dom->querySelectorAll( "h1, h2, h3, h4, h5, h6" );foreach ( $headings as $heading ) {   // Do something}

Advanced Search

Suppose you have a bunch of links and you want to find only those which point to "example.com/test/". Again, you can use the same attribute selectors as you would elsewhere

 PHP$dom->querySelectorAll( "a[href^=https\:\/\/example\.com\/test\/]" );

Replacing content

Sadly, it isn't quite as simple as setting the innerHTML. Each search returns a node. That node may have children. Those children will also be node which, themselves, may have children, and so on.

Let's take a simple example:

 PHP$html = '<h2>Hello</h2>';$dom = \Dom\HTMLDocument::createFromString( $html, LIBXML_NOERROR | LIBXML_HTML_NOIMPLIED, "UTF-8" );$element = $dom->querySelector( "h2" );$element->childNodes[0]->textContent = "Goodbye";echo $dom->saveHTML();

That changes "Hello" to "Goodbye".

But what if the element has child nodes?

 PHP$html = '<h2>Hello <em>friend</em></h2>';$dom = \Dom\HTMLDocument::createFromString( $html, LIBXML_NOERROR | LIBXML_HTML_NOIMPLIED, "UTF-8" );$element = $dom->querySelector( "h2" );$element->childNodes[0]->textContent = "Goodbye";echo $dom->saveHTML();

That outputs <h2>Goodbye<em>friend</em></h2> - so think carefully about the structure of the DOM and what you want to replace.

Adding a new node

This one is tricky! Let's suppose you have this:

 HTML<div id="page">   <main>      <h2>Hello</h2>

You want to add an <h1> before the <h2>. Here's how to do this.

First, you need to construct the DOM:

 PHP$html = '<div id="page"><main><h2>Hello</h2>';$dom = \Dom\HTMLDocument::createFromString( $html, LIBXML_NOERROR | LIBXML_HTML_NOIMPLIED, "UTF-8" );

Next, you need to construct an entirely new DOM for your new node.

 PHP$newHTML = "<h1>Title</h1>";$newDom = \Dom\HTMLDocument::createFromString( $newHTML, LIBXML_NOERROR | LIBXML_HTML_NOIMPLIED, "UTF-8" );

Next, extract the new element from the new DOM, and import it into the original DOM:

 PHP$element = $dom->importNode( $newDom->firstChild, true ); 

The element now needs to be inserted somewhere in the original DOM. In this case, get the h2, tell its parent node to insert the new node before the h2:

 PHP$h2 = $dom->querySelector( "h2" );$h2->parentNode->insertBefore( $element, $h2 );echo $dom->saveHTML();

Out pops:

 HTML<div id="page">   <main>      <h1>Title</h1>      <h2>Hello</h2>   </main></div>

An alternative is to use the appendChild() method. Note that it appends it to the end of the children. For example:

 PHP$div = $dom->querySelector( "#page" );$div->appendChild( $element );echo $dom->saveHTML();

Produces:

 HTML<div id="page">   <main>      <h2>Hello</h2>   </main>   <h1>Title</h1></div>

And more?

I've only scratched the surface of what the new 8.4 HTML Parser can do. I've already rewritten lots of my yucky old preg_ code to something which (hopefully) is less likely to break in catastrophic ways.

If you have any other tips, please leave a comment.

#HTML #HTML5 #php

Emmanuel Moorekodoninja
2025-05-09

I need to go back to โ€ฆ First thing first new officeโ€ฆ

Then back to selling software.
@Aviyon_com

Originally created on at 12:20 AM ยท Jul 31, 2022

2025-05-07

HTML as Background in Ubuntu 25.04 possible? #desktopbackground #html #javascript #html5 #2504

askubuntu.com/q/1547283/612

2025-05-06
Clayton Errington ๐Ÿ–ฅ๏ธcjerrington@mstdn.social
2025-05-03

Found this relic today while cleaning. Anyone need some reading on HTML5 and CSS?

#HTML #html5 #CSS #css3

Inautiloinautilo
2025-04-30


The HTML โ€˜citeโ€™ element ยท What belongs in a โ€˜citeโ€™ element, and does it matter? ilo.im/163l7s

_____

Claudio Piresclaudiocamposp
2025-04-29

Build any sports and health site design without code knowledge - Sport responsive WordPress theme - Sportive and health WordPress drag and drop website builder template visualmodo.com/theme/sport-wor ๐Ÿšฃโ€โ™‚๏ธ๐Ÿ‹๏ธโ€โ™€๏ธ๐Ÿšดโ€โ™‚๏ธ๐ŸŠโ€โ™€๏ธโšฝ๐Ÿ€๐Ÿˆ๐ŸŽพ
Build your own sports space, grow your brand and business!

Claudio Piresclaudiocamposp
2025-04-28

Build any landing-page site design without coding - Stream WordPress one-page theme - All you need to build an exceptional one-page website style easily with anchors without coding and with a drag & drop live page builder visualmodo.com/theme/stream-wo Build your own one-page/landing-page that converts and grow your brand! โš“๏ธ๐Ÿ“ฑ๐Ÿ’ป๐Ÿ–ฅ๏ธ

Given that the biggest obstacle to the adoption of microformats is the lack of programs that actually implement them, I have been toying with the idea of writing some useful programs that work with all the information we put onto our websites.

It's frustrating that we're at a point where the bottleneck of the Semantic Web ideal is not actually a low amount of structured information, but the lack of any program to do anything interesting whatsoever with it!

Who cares if we all use the HTML5 tag on our sites, if there is no browser that actually provides a "contact webmaster" button in the sidebar?

Who cares if we all mark up our cooking recipes as perfectly detailed machine readable h-recipe entries, if there is zero cooking apps or whatever actually capable of using any of the data we provide?

Who cares if we all use h-cards and h-feeds and whatnot if there is no feed reader that can actually notify us when our friends posted a new blog entry?

#microformats #microformats2 #HTML #webDev #indieWeb #semanticHTML #semanticWeb #HTML5

2025-04-26

๐Ÿ› ๏ธ Title: Phaser
๐ŸฆŠ๏ธ What's: A libre Javascript framework for developing HTML5 games for PCs, mobiles & browsers
๐Ÿก๏ธ phaser.io/
๐Ÿฃ๏ธ github.com/photonstorm/phaser
๐Ÿ”– #LinuxGameDev #Programming #Framework #HTML5
๐Ÿ“ฆ๏ธ #Libre #SRC #Bin
๐Ÿ“– Our entry: lebottinlinux.vps.a-lec.org/LO

๐Ÿฅ๏ธ Update: 4.0.0 RC 2
โš—๏ธ New features ๐Ÿ’Ž
๐Ÿ“Œ๏ธ Changes: github.com/phaserjs/phaser/rel
๐Ÿฆฃ๏ธ From: ๐Ÿ›œ๏ธ github.com/photonstorm/phaser/

๐Ÿฆ‰๏ธ youtube.com/embed/jHTRu4iNTcA
๐Ÿ•ฏ๏ธyoutube.com/embed/0qtg-9M3peI
๐Ÿ•ฏ๏ธ[fr] youtube.com/embed/sUkcd0Rrpis
๐ŸŽฎ๏ธ youtube.com/embed/gnfgwkVg7vc

๐Ÿ•ถ๏ธ The project icon

๐Ÿ“š๏ธ Phaser is a fast, fun, libre, multi-platform Javascript framework for developing HTML5 games for PCs, mobiles and browsers. It offers WebGL and Canvas rendering on desktop and mobile web browsers. Games can be compiled on iOS, Android and native applications using third-party tools. You can use JavaScript or TypeScript for development. It is used by thousands of developers worldwide. Phaser Editor is a commercial product designed to create games using the libre Phaser framework.
Claudio Piresclaudiocamposp
2025-04-22

Beyond WordPress theme visualmodo.com/theme/beyond-wo gives you the ability to create any design in minutes without touching a single line of code. It is very easy to add any element and customize it as much as you desire with a page builder. Add a portfolio to showcase your work, set up an online shop to sell your products, or promote your business with service boxes. Build your own responsive website! ๐Ÿ“ฑ๐Ÿ’ป๐Ÿ–ฅ๏ธ๐Ÿ”Œ

Claudio Piresclaudiocamposp
2025-04-19

Build your own blog today with our amazing Ink Blog WordPress theme - Clean, modern, stylish and minimalist responsive blog template for WordPress visualmodo.com/theme/ink-wordp
Build your own blog, write your legacy! ๐Ÿ“โœ๏ธ๐Ÿ–จ๏ธ๐Ÿ–Š๏ธ

Claudio Piresclaudiocamposp
2025-04-18

Food WordPress theme - Restaurant, pub & bar template - Build every restaurant site design without code knowledge - A delicious restaurant, bakery & candy shop theme visualmodo.com/theme/food-word Build your own food website and grow your brand! ๐Ÿ‘ฉโ€๐Ÿณ๐Ÿฒ๐Ÿน๐Ÿป๐Ÿ•๐Ÿฐ๐Ÿ”๐Ÿท๐Ÿด๐Ÿฟ

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst