Hacker Newsnew | past | comments | ask | show | jobs | submit | helenius's commentslogin

Interesting thing about File Explorer is that the 20-year-old APIs for extending it still work! While File Explorer has changed between Windows versions, the underlying Win32 API seems to be the same.

A year ago I dove into shell extensions [1] to implement a drag-and-drop gesture for a file type. I wanted to create a bookmarking system for files in File Explorer based on nothing more than the bookmark being named after the file I want to bookmark (so they're next to each other when sorted from A-Z) [2]. I had not used Visual C++ before but the tutorials I found from the early 2000s, and some helpful advice from MSFT via Stackoverflow, got me through it.

There is also a simpler way to write Shell extensions using a C# wrapper if that works for your use case [3].

[1]: https://docs.microsoft.com/en-us/windows/win32/shell/shell-e... [2]: https://filemark.app/ [3]: https://github.com/dwmkerr/sharpshell


Maybe somewhat related: can anybody guess what the idea behind the images in this article is?

  <img src="/images/trans.gif" data-src="images/speaking.png">
trans.gif is just a 1x1px invisible pixel.


It's lazy loading the images - when the page initially loads, it only loads one small image (trans.gif), and the file specified in the data-src attribute isn't loaded until you scroll near to the img tag. Specifically, it's using this plugin: http://luis-almeida.github.io/unveil/


The given use of that on frankchimero.com is bad.

If I use uMatrix then even enabling scripts for the site won't show the images.

Moreover, if the javascript is turned off completely, the proper approach for the given task is having the

    <noscript
and the images properly specified.

One of the images is just a PNG of an emoji U+1F632 (my guess). Another of the emoji of the cake. He could have saved on these two completely.

That leaves us with the tile svg and the 170K PNG for the face of the author, which should obviously be a 40K JPG.

Finally, the img tags on that page don't contain dimensions, whereas it's probably(1) better to still have them: https://www.computerhope.com/issues/ch001158.htm

Given the topic of the post (the need to keep things simple when making web pages), I consider these observations relevant.

1) Probably as I'm not in the business and I don't follow most recent developments so I don't know if the arguments from computerhope.com are obsolete by the most recent standards or implementations, so all relevant technical information is welcome.


I kind of wish more sites assigned dimensions to `img` tags too. Unspecified or scripted dimensions make mess more often than not.


Tracking scripts don't need to do anything but read the hit in the access log. That said, it's also trivially easy to output the bytes for a 1x1 invisible gif as the response from your tracking endpoint.


It is easy, but is it fast? Serving a static GIF has an overhead of ~0, and it doesn't need any executable beyond the HTTP server to run on the machine, except to move the logs out for processing (syslog, rsync, what-have-you, in most cases out-of-band wrt the HTTP server).


This sounds interesting! Some product _landing_ pages are not readable without Javascript. With this you could at least figure out what the product is about.

Once I'm enrolled I can enable Javascript when the product makes use of it. :)


Friendly reminder to disable Javascript, at the very least, by default.

Only run Javascript on domains you really need and trust, and even then the minimum amount required for the site to function.

https://github.com/gorhill/uMatrix/


> Only run Javascript on domains you really need and trust, and even then the minimum amount required for the site to function.

This is so inconvenient that practically no one is going to do it. I used to use NoScript but found I was just constantly clicking "temporarily allow."


If you just want a search engine without Javascript try https://duckduckgo.com/html

Adding to Firefox is easy via https://addons.mozilla.org/en-US/firefox/addon/duckduckgo-ht...


That's one trick I had somehow missed. Mind you, that's extremely barebones, not as much as a link to any image-search or options.


Remember to always (every time) set width/height for the <img> tag, otherwise it will fill the entire screen/container.


Yes! Loading many sites without width/height set on mobile connections display a horrible jitter with logos and social icons polluting the entire screen initially.


In the case here with the Twitter logo, lack of height attribute causes the logo to look squashed on some oldish browsers. I imagine the addition of height would fix this.


If you like syncing files you could look into user.js for syncing config settings:

http://kb.mozillazine.org/User.js_file


Am I missing something? I don't see how that ties into Firefox Sync to propagate changes to all instances.

* Also, that's very cool regardless.


Not really, just that you need to be crazy enough to write and sync a file instead with e.g. Resilio or Dropbox.


Well I appreciate the link. That's certainly easier than editing properties in about:config.


Looks like this needs privacy.resistFingerprinting set in about:config.

>I think it's a bad idea to advertise this to the general public, because you have to enable the "privacy.resistFingerprinting" pref for this to work.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: