AppleScript to change clipboard image format

coding macos office

For the longest time, I’ve struggled to get the macOS version of Microsoft Office (Word, PowerPoint, Excel) to paste images as PNG or JPEG, instead of the default TIFF. TIFFs make the files far larger than they need to be! I’ve resorted to macros, shell scripts, Quick Actions... all paste PNGs (lossless) into MS Office! But I just found another method with AppleScript.

Continue reading...

A few of my bookmarklets

coding javascript

I have a few Javascript bookmarklets that I thought I’d share. Bookmarklets are short snippets of JavaScript code that run in the context of the current web page in the browser. I prefer them over extensions since I can see what the code does. There are plenty on the web, here are a few of mine.

Continue reading...

Hide Firefox Toolbar and Tabs in Fullscreen

coding macos javascript

I use macOS spaces (virtual desktops) to arrange the various apps I frequently use. I have one space setup with two Firefox windows, in fullscreen Split View mode. But by default, Firefox windows are not really “full screen” for me, in that the tabs, toolbar and bookmarks bar will still be displayed. Here is my workaround to force the browser to full screen.

Continue reading...

CSS tips to avoid Javascript

coding css

Recently I’ve been building a few web sites without JavaScript where possible, relying instead on modern browser support for CSS.

Here are some things I’ve figured out, including toggling the NavBar burger dropdown, smooth scrolling, showing and hiding modal dialogs with transitions!

Continue reading...

Single Page Bulma template with Smooth Scroll and Scroll Spy JavaScript

coding javascript css

I was building a single page website using Bulma, and I wanted to achieve effects similar to what I was familiar with using Bootstrap’s Creative one page theme. As you know, Bulma (mostly) does not provide any JavaScript code, so I had to code the Smooth Scrolling and Scroll Spy features I missed. I intentionally avoided jQuery! So I present my solution using plain-old JavaScript.

Continue reading...

Word Macro to paste MS Office Drawing / TIFF image as PNG

coding office

I really don’t know how to explain today’s post. In short: I want to copy drawings and images out of Microsoft Office in PNG format. On macOS, copy-and-paste seems to prefer the TIFF format, resulting in large Office files. I’d rather the images be converted to PNG, preserving transparency but providing high compression. However, this is more complicated than it seems, because of limitations in Office and PowerPoint in particular...

Continue reading...