News for hackers. Stuff that matters.

chowderman

Re:Deurbanising the Web [pdf] on Monday July 19, 2021 @10:35AM (#27883084)
> HTML can easily be offline-able. Base64 your images or use SVG, put your CSS in the HTML page, remove all 2-way data interaction, basically reduce HTML to the same performance as PDF and allow it to be downloaded.

I built a tool for this exact purpose[0] since the HTML specification and modern browsers have a lot of nice features for creating and reading documents compared to PDF (reflow and responsive page scaling, accessibility, easily sharable, a lot of styling options that are easy to use, ability for the user to easily modify the document or change the style, integration with existing web technologies, etc.). In general I would rather read an HTML document than the PDF document since I like to modify the styling in various ways (dark theme extensions in the browser for example) which may be hard to do with a PDF, but its more of a personal preference. Some people will prefer that the document adjusts to the screen size of the device (many HTML pages), and others will prefer the exact same or similar rendering regardless of the screen size (PDF).

Either way, kind of a fun idea making a website using just PDFs. Not the most practical choice, but fun none-the-less.

[0] https://github.com/chowderman/hyperfiler

Re:HTTrack Website Copier – Offline browser on Saturday July 10, 2021 @10:46AM (#27793654)
There is also a similar program called HyperFiler[0]* that bundles web pages into single HTML files with a few more options such as a headless chromium transport option, built in minifiers, page sanitizers, and an option to grayscale the output pages, among other options. It's TypeScript based and has an programmatic API to customize the bundling process as well.

[0] https://github.com/chowderman/hyperfiler

* disclaimer: I created HyperFiler

Re:Useful and useless code comments on Friday June 18, 2021 @10:15AM (#27550536)
Same here, I think small comments every 3-10 lines adds a lot of value, especially to large code bases. Being able to quickly scan through comments visually when you only need a high level overview of a chunk of code can take a 5 minute task of reading and understanding 50 lines of code into a 15 second task of reading and digesting a few small comments.

Also, I'm curious to see how your experience was working on the firefox code base. I haven't checked out the code base myself, but have built from source a few times. Curious to see how the Rust progress has been going on the code base and which parts of firefox are currently implemented in Rust.

Re:The 88x31 GIF Collection on Wednesday June 16, 2021 @12:06PM (#27530080)
Wow, this is an amazing collection of banners! For anyone have trouble with the page loading all of the gifs, I bundled all 4 of the pages into a single, massive 33 MB HTML page with all 3000+ of the GIFs encoded into data URIs. Here's the link, and all credit goes to the dabamos.de website owner for creating the collection:

https://chowderman.codeberg.page/cyber_dabamos_de_88x31_gif_...

A project that I created (written in TypeScript) to bundle web pages into single HTML files with the goal of producing as small of bundles as possible. Also includes a rich set of features to customize pages (around 100 command line arguments are available), and some other interesting features, such as the ability to inject a Flash player into the bundled page that will run flash content bundled in the page.
Re:Hacker95.css – Make Hacker News look like Windows 95 on Thursday July 23, 2020 @09:37PM (#23934773)
This is a CSS stylesheet to theme your Hacker News in a Windows95/98 style
Re:OS.css – Windows 98 and XP styled CSS on Wednesday July 22, 2020 @11:53PM (#23924019)
Style your web pages like Windows XP and 98! Also here is the link to the github repo for this library: https://github.com/chowderman/os.css
It can be packed very easily actually! It is a single HTML file, so you can easily embed it into an electron app or a webview if you wanted. Only problem is it would bring the total size to ~100 MB instead of ~1 MB, and would be tough to make it a single .exe file.
The main differences are:

* it works totally offline (it performs no XHR requests and none of the libraries are linked to CDNs or other sites)

* is contained within a single ~1 MB in size .html file (I baked all images, scripts, style sheets, etc. within a single file)

* is lighter, as I removed some features to keep it closer to the original (but kept a few like the history and rendering as a GIF)

* is Win XP themed instead of Win 95

Re:XP Paint – A Web-Based Version of Window XP's MS Paint on Wednesday July 08, 2020 @11:56PM (#23776798)
you know it! It had a sleek and modern look for the time, while still having the simplicity and user-friendliness of MS Paint from Win 95/98. really wish this version of paint was still supported in Win 10
Re:XP Paint – A Web-Based Version of Window XP's MS Paint on Wednesday July 08, 2020 @11:09PM (#23776577)
Here is the repo as well: https://github.com/chowderman/xp-paint.

Note: this is in no way affiliated with Microsoft, its merely a fan project based on my love of Windows XP