javascript

Javascript to get the OPML of all YouTube subscriptions

Getting OPML for all YouTube subscriptions I just followed the directions here: https://github.com/jeb5/YouTube-Subscriptions-RSS#bookmarklet It scrapes the page and so expects a certain format, so it is brittle and might break; but it only needed to work for me once, and it did great! After pasting the thing I got a “download?” window that even gave me a count and a progress report. The Code (async () => { const dialog = document.

A Lesson in the Beauty of Data - XML Parsing on the Front End: to CLJS or not to CLJS?

The task came that I need to parse some XML in a front-only app. In a sense, browsers are just big XML (≅ HTML) processors, so embracing the Clojure principle of being a hosted language, it seemed desirable to utilize the built-in power of my browser. This effort turned out to be a rabbit hole, though. Consider the following: A Native Approach (let [s "<title>Tech.ToryAnderson.com</title>" ;; 1 p (js/DOMParser.) ;; 2 doc (.

Google stuff breaking: setOnLoadCallback

I just had yet another case of stuff I am responsible to maintain breaking because of Google. My long-standing program has run with the following code: google.setOnLoadCallback(function() { /* ... */ }); This has worked for a decade, but finally it seems to have broken. Fortunately, I already had a suspicion that it was a google thing breaking on me as this has happened before. While I am not part of whatever update list is warning about these upcoming changes, they were at least decent enough to tell me that I need to load() charts first.

Easy cross-site slide-show

I recently implemented a small slide-show banner for showcasing products, in this case books, that works across sites. I did it with a nice JQuery slideshow plugin and iframes. I happened to be inserting it into Wordpress pages. The Problem My client has three separate websites he uses for distinct blogs, but as an author he wants to showcase the books he’s published on each of them. It will be a major problem to implement three distinct solutions, even if they are identical, for each blog, and update each one whenever something changes (such as a new book coming out).