TIL Firefox debugger can edit JavaScript files

I’ll spare you the long story of why I had to edit a JavaScript file, but today I learned that since Firefox 128 you can add a script override in the browser Debugger Panel. This downloads the JavaScript file in question, where you can edit it with your favourite editor.

  1. Open DevTools by hitting F12 and select the Debugger.
  2. Right-click on the JavaScript file in the source list and select “Add script override”.
  3. Save your file somewhere and edit.
  4. Reload the page to apply changes.
  5. Remove the override by right-clicking on the file again and selecting “Remove script override”.

The file I was editing was minified, so Firefox doesn’t save the nicely unminifed file you were looking at, but it’s not too hard to unminify it. It was a small change I was making, so it wasn’t too difficult to find the right place to edit.

The image shows a cat sitting comfortably on a black office chair. The cat has a tabby coat with a mix of brown, orange, and black markings, and it is looking directly at the camera with bright green eyes. The chair appears to be slightly worn, especially on the seat, which shows some signs of use. The background consists of a stone or brick wall, suggesting that the setting might be either outdoors or in an industrial or rustic indoor space. There is also a red and black striped fabric visible to the left side of the image. The overall scene gives off a cozy and relaxed vibe, with the cat being the focal point of attention.

Yes, yes, Chrome has been able to do this for a long time, apparently. Thanks for letting me know.

This Reddit is a private community

The moderators of r/programming have set this community as private. Only approved members can view and take part in its discussions.

In a dramatic turn of events, a wave of subreddits has gone dark today, making their presence disappear from the digital landscape. These virtual communities, brimming with discussions and camaraderie, have taken this drastic action to protest against recent changes to the pricing of the Reddit API for third-party mobile apps. It’s a bold move that could potentially alter the Reddit landscape forever, for the worse.

Among the affected applications is Apollo, a highly regarded iOS Reddit app. The developer of Apollo would have been burdened with an astonishing $20 million annual cost to keep the app running. Such a financial blow would have undoubtedly crippled their operations. As for me, I’m an avid user of Reddit is Fun, a cherished app that has become an integral part of my daily routine. Unfortunately, the costs associated with maintaining this beloved app have also skyrocketed, forcing the developer behind it to announce its impending shutdown on June 30th.

I tried the official app, but it’s not as polished as RIF. The second post I saw was a promoted post, which is, of course, one of the reasons for pushing users towards that app. Many point out that Reddit wouldn’t be Reddit if it wasn’t for all the volunteer moderators who keep the site running. Annoying those moderators isn’t going to encourage them to volunteer more time.

I hear that the Reddit app can be modified and patched (no, I won’t link to it) but I’ll probably visit Reddit a lot less now. There’s always Hacker News, where there are already two threads this morning about it. In one of these threads, a user conjectured that Reddit may be intentionally shedding its current user base to appeal to a less technically inclined, more advertisement-friendly demographic. It begs the question: who will shoulder the responsibility of moderation in this new era?

As well as the protest, Reddit seem to be boycotting themselves. The site went down today for a while. It might be all the private sub Reddits don’t cache that well, and the traffic to so many of them is bringing things down. Ouch.

I guess I’ll be reading more books. That will be good for my peace of mind.

ChatGPT wrote a script

If you ask ChatGPT to write a script to do some computer operation, it will.

It will write an actual script with an actor and narrator and then add a Python script to do what you wanted in the middle of it.

[INT. COMPUTER SCREEN – DAY]

A computer screen displays a folder containing a motion JPEG file named “Samsung_Camera.mjpeg”. The folder also contains various other files.

[INSERT: CLOSE-UP of the “Samsung_Camera.mjpeg” file]

NARRATOR (V.O.) Motion JPEG files are typically created by Samsung cameras and consist of both video and image frames interleaved together.

[INSERT: CUT TO a programmer, JAMES, sitting at his computer desk, wearing glasses and typing on his keyboard.]

JAMES (to himself) I need to separate the video and image frames from this motion JPEG file.

[INSERT: CLOSE-UP of James’ computer screen, showing a code editor open with a Python script.]

JAMES (V.O.) I can use Python to extract the video and image frames from the motion JPEG file.

[INSERT: CUT TO the Python script on James’ computer screen, showing the following code:]

……

[INSERT: CUT BACK TO James, who is now running the Python script.]

JAMES (excited) There we go! The video frames are saved as “Samsung_Camera_video.avi” and the image frames are saved as “Samsung_Camera_image_xxx.jpg” files, where “xxx” represents the frame number.

[INSERT: CLOSE-UP of the folder, now showing the extracted video and image files alongside the original motion JPEG file.]

NARRATOR (V.O.) James successfully separated the video and image frames from the motion JPEG file and saved them as separate files.

[FADE OUT.]

[END OF SCRIPT]

I asked ChatGPT asked to write a script to perform a task on my computer.

I asked ChatGPT to “Write a script to separate out the video and image from a motion Jpeg file created by a Samsung camera.” As you may guess from reading the “script”, the Python script it generated didn’t do quite what I had in mind. It created separate Jpeg files for each frame of the video.

Further prompts to produce a BASH script that did the same produced attempts that came close, but failed to extract the video, even when I used exiftool -b -EmbeddedVideo. That did work with motion photos from older phones, but maybe they changed something in the S23U.

So, unless you’re a budding movie producer, be exact when you ask ChatGPT to write you a script to do something.

3 months free Backblaze again

Well, well. Backblaze are offering 3 months free if you sign up before December 31st, again. I first heard of this offer in 2013 when I published a post about in March that year.

Backblaze is a cloud backup company that have a neat app that runs on your computer and backs up everything on it to encrypted storage. If you have external drives, as long as they’re plugged into your machine, Backblaze will happily keep all of it safe.

Some of my photos, from 2005 all the way up to 2022. Backed up on Backblaze.

You get your normal free month to test it and figure out if it will work for you. If you sign up, you get 2 months more for FREE! And, best of all (for me), I get 3 months free too for referring you. Yay!

Do I recommend Backblaze for backing up your PC or Mac? Why yes, I do. I’ve been paying them since 2013. I have over 3TB of photos backed up there and with 30 days of revisions I can go back and restore anything I find missing or corrupted. You can increase that 30 days to 1 year, but I’m fine with 30 days.

How much is it? I went with the 2-year subscription. It’s $130 for 2 years, which works out at less than $6 a month. A bargain, if I ever saw it.

Anyway, sign up to Backblaze through this link, and you’ll get an extra 2 months free added to your subscription if you pay them money. You don’t need to pay them money immediately. You still get a free trial of a month to test it out.

I know, I know, you’re not going to do it. You’re not worried about your computer dying, are you? I would be a nervous wreck if I didn’t have backups of my photos, videos, and other documents. One little accident, an old computer dying, or ransomware, and it’s all gone. I’d lie awake at night worrying about my work if that was me. But that’s just me. 🙂

The Twitter Meltdown (again)

I don’t really have anything enlightening to say about Elon Musk kicking journalists off Twitter, except that it’s not really surprising. He seems to be rocking from one crisis to another. Has the Twitter Terms of Service been changed to, “Don’t hurt Elon’s feelings”?

CNN journalist, Donie O’Sullivan shared an interview on his Mastodon account about it, which of course you can’t share on Twitter.

Anyway, I can see from here that there are thousands of people opening new Mastodon accounts every hour since that happened. I jumped ship in early November when he fired half the staff in the company. Two weeks later, a quarter of a million people joined Mastodon in one day. This surge in new users is nowhere near that big. While Twitter, the website, didn’t collapse within days, I still think it’s only a matter of time. Take a look at Twitter is Going Great to get a quick feel for how badly it’s going great. It appears they haven’t updated yet with the latest news, but I’m sure it’s only a matter of time.

Tumblr is another website benefiting from the exodus, but they can handle it. As Matt said in a recent interview,

Particularly in the last month or so, we have seen some huge waves and droves of users. Fluent celebrities like Ryan Reynolds, Lynda Carter, and Halsey are coming over or coming back. It has been a fun time to be on Tumblr. I tell the team that fortune favors the prepared. There are also a lot of other places people could go, but we are ready for the waves. We can handle 200,000 to 300,000 sign ups a day. We can handle what’s happening.

Matt Mullenweg

Before this influx of new people joining, my Mastodon feed was definitely quieter than it was a few weeks before. Early mornings are always quiet because I mostly follow Irish people, but the local feed was quiet with minutes going by between posts. That all changed today. My “Elon Musk” filter hardly had to do any work in the last week until today, but it’s working hard now!

It started with Eugen Rochko asking “What a thing to wake up to”. Then we found out that Twitter had banned sharing Mastodon links on their site. What is ridiculous is that Twitter is massively bigger than the entire Fediverse. How can Elon feel threatened by such a small alternative website network? As Dave Winer said, “There’s a story to tell about this, and it isn’t over yet.”

If you do join Mastodon today, here are a few things you should do:

  • Add an avatar.
  • Write an introduction post or fill in your bio.
  • Write a couple of posts and pin them to your profile. When people from other instances (other servers) see your profile, they’ll see the pinned posts. They won’t see any other posts if you’re not friends with anyone on the remote instance.
  • Look up some hashtags. The WordPress hashtag is busy. You can follow hashtags too!
  • Add .rss to any Mastodon URL to get an rss feed. Add the feed to your blog. Look at the sidebar of this blog for an example.
  • Boost liberally. There’s no algorithm so that’s how posts go viral.
  • I’m there as @donncha – say hi!

Consider adding your blog to the Fediverse, but in my experience, I prefer to share things from my own personal account. It’s much easier to chat with others that way.

Restore terminal access to Dropbox on macOS

Dropbox just updated and moved the Dropbox folder to ~/Library/CloudStorage/Dropbox, a secure location. There is still a symlink from ~/Dropbox to that folder, so hopefully any local scripts will continue working.

The first thing I did was open an iTerm2 and attempt to look in ~/Dropbox with cd Dropbox. As it is hard-coded in my brain, when I change to a new directory, I will want to see what’s in it, so I immediately typed ls -l. Too fast for my own good, as I noticed the flicker of a dialogue appear and disappear when I tapped the return key.

~/Dropbox » ls
ls: cannot open directory ‘.’: Operation not permitted

I had denied iTerm2 access to the Dropbox directory. Oops.

Thankfully, it’s easy to fix. Open up the Security & Privacy settings in System Preferences. Go to the Privacy tab.

Click on Files and Folders and scroll down to your terminal programme.

You’ll see a new checkbox there for Dropbox. Click the lock to authenticate and click the Dropbox checkbox.

Go back to your terminal, and you’ll be able to see what’s in ~/Dropbox once again.

Lightroom Classic does not have access to some Standard folders.

I have found a brand new error in Lightroom that doesn’t appear in search engines yet. It started happening after the update today. There are similar error messages reported on the Adobe forums, but not this one.

Unfortunately, the “Learn More” link goes to a URL that quickly changes to https://helpx.adobe.com/lightroom-classic/help/allow-permissions.html which shows a 404!

It appears the entire https://helpx.adobe.com/lightroom-classic/ directory is showing a 404 now. I guess they really do want to get rid of Lightroom Classic.

Anyone know how to fix this one?

Edit: the next morning it looks like Adobe have fixed their site and the documentation above is live!
For unknown reasons, that warning dialogue has gone away. The only major change was updating to macOS 12.5.1. If you see the error, “Lightroom Classic does not have access to some Standard folders.” then hopefully updating macOS will do the trick, but the documentation is now working and suggests going into Systems & Privacy to give Lightroom Classic more access.

Bye Bye Relics of 1999

It’s about time I dumped some of this stuff. Two of my machines have a CDROM drive but I don’t use either of them. I haven’t had a 1.44MB floppy drive in well over a decade, or more likely fifteen years!

I recently found the binder with these items, the motherboard manual and other things. They were stored away in a dark corner of a cupboard for more than 20 years. Safe in their dark spot but ever so slowly decomposing. The machine they belonged to has been long disposed of.

When was the last time you installed software from a CDROM or a floppy disk? I ripped the DVD box set of “All Creatures Great and Small (1978)” last December. It was on my ageing Macbook, but I do not remember the last time I used a PC floppy disk at all.

February 2012 was the last time I used a C64 disk. I archived as many of my C64 disks as I could then. Those disks are still in the attic. I don’t know if I’ll ever be able to throw them out. I guess they’ll be disposed when I’m gone and they’re an ancient artefact of a bygone era.

Google Photos ends free storage tomorrow

That photo taken today is a helicopter rotor

Google Photos will start counting your uploads against a storage limit from tomorrow. Make sure you upload anything you’ve been meaning to upload in the next few hours!

Also go into your shared albums and click the “Save photos” button if you want “local” copies of any photos shared with you.

I’m sticking with Google Photos. The ease of sharing photos and AI search make it worth while, but I will be disabling automatic upload off my phone. I take too many snapshots that I don’t care enough about to pay for them.

Firefox: bookmark all the tabs

Browser tabs. We all love them, and then we hate them when there are too many. Sprinkled among the litter of blog and Facebook posts, Twitter and Reddit threads, are the nuggets you want to keep.

Too many things

You could just close them, you probably won’t miss them but my brain rebels against the thought. Instead I’d like to bookmark them somewhere so at least in some distant future I can review them at my leisure. Thankfully it’s easy, in Firefox at least. It looks like it’s even easier in Chrome!

First of all, right click on a tab and click on “Select all tabs”.

All your tabs will be highlighted and “Bookmark Tab” helpfully changes to “Bookmark Tabs”.

Clicking that will bring up a familiar bookmark window. I opted to put the my browser windows into different folders. I had a lot of tabs open..

But now I’m back to one window and a handful of tabs related to my current project. Out of sight, out of mind! 🙂