💾 Archived View for gem.librehacker.com › gemlog › starlog › 20230519-0.gmi captured on 2023-09-08 at 16:06:04. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-05-24)

-=-=-=-=-=-=-

Saturn, Hacking 2023-05-19

Saturn's moons don't fit the evolutionary model

I found this great link in a newsletter:

10 Things: Unsolved Mysteries of Saturn's Moons

It basically amounts to a glaring admission by NASA (back in 2019) of the many ways that the things that we know about Saturn's moons don't line up with what we would expect based on the popular solar system formation myth. Of course, NASA wasn't meaning to present it that way. Rather, these are "mysteries" that will one day be solved by brilliant scientists. But I challenge the reader to consider an alternative — that the naturalistic model doesn't fit, because the solar system was formed supernaturally about 6000 years ago.

Hacking the interfaces I am stuck with

I'm a free software advocate and also not fond of the big Web, with its SAASS, Web applications, and other issues. In my personal life, I am mostly able to get by without compromising my principles, but at work things are more complicated. There is that one Windows program that runs machine X, the company e-mail on outlook.office.com (with IMAP disabled!), and other Web apps we are forced to depend on. This last way, I had the notion to try to learn some more about how these systems could be reprogrammed, to give me some level of feeling of control and freedom. In the process, I learned more about two things:

AutoHotkey

For Windows, there is a free software program (GPLv2) called AutoHotkey, which is really a programming system.

AutoHotkey

It is basically a scripting language focused on interacting with the desktop, and includes the ability to generate keyboard events, mouse clicks, and most importantly, window activation based on various things such as window title. So, if you happen to be stuck each day in some boring routine clicking buttons or inputting data into proprietary, Windows-based GUI programs, AutoHotkey might be able to help you automate some of those processes. Myself, I used it to automate a systems startup process that involved commands inputted into three different programs.

Of course, there are better ways to do automation, but in less-than-ideal circumstances, AutoHotkey might be your most practical choice.

Hacking Drupal (client side)

I view and file reports through a certain Drupal-based Web application. That rubs up against my issues with using large JavaScript-based Web applications.

JavaScript, the Web Browser, and Computing Freedom

Drupal is free software, however, and although you can't control what is happening server side, there is a lot to hack on the client side. So I learned a bit about JavaScript programming and how to use the Icecat (Firefox) console and it's other inspection and programming tools.

Once I learned a bit about the JavaScript and the DOM, it is fairly easy to make live changes to most of the Web page elements, such as pre-filling form selection boxes. Typically something like this

document.getElementByID("some-selection-form-element").value = '2'

Something more tricky was figuring out how to modify CKEDITOR field data. CKEDITOR is a 3rd party module which provides a fancy WYSIWYG editor for text fields. But in the end it came down to simply setting field data in a CKEDITOR instance, like so...

CKEDITOR.instances.comments-text-field.setData("My standard report input goes here")

So, I wrapped all the changes I wanted into a bookmarklet, which I can now click to pre-fill a bunch of fields on a certain report page. Maybe doesn't sound that amazing, but I felt like on some level I took back control of my Web browser.

In the process, I learned one or two other interesting things:

- Greasemonkey is a Firefox add-on which is designed to let you store and apply automatically such user-side scripts. I haven't tried it myself yet.

- The Hacketilo project has now moved over to a proxy-based approach, where you can replace JavaScripts by intercepting them MitM style. Unfortunately, I heard from the main developer that he has not been able to work on the project lately and probably won't be doing so in the near future, so it is stuck on an early beta release for now.

- I heard about and tried out an interesting project call "Woob" which is basically a set of Python tools and modules designed to allow you to utilize Web services without using a Web browser. E.g., you can pull a weather report from weather.com and have it dumped to the terminal, or access you bank account without opening up a Web browser. Somebody has to program a backend for each specific Web site/service. The package `python-woob' is available through the Guix package manager.