Featured Posts without jQuery?
So, you might know this amazing tutorial right here by @fukuo about making a featured posts section with the Tumblr API and jQuery.
Given that we're all kind of try to move away from jQuery, I thought, would it be possible using vanilla JS only? I tried converting it by myself first but — after reading a StackOverflow thread on how to convert jQuery's "getScript()" to vanilla JS — I realized that I lack the knowledge to do that (and not need ages for the conversion). Instead, I decided to use different online converters and check if the JS looks valid and doesn't contain traces of jQuery still; I ended up using this converter here. The result can be seen here (just the script).
However, when I use this script, there is no result at all and the featured posts are not being displayed. The code analysis on CodePen tells me that "Uncaught TypeError: document.querySelector.getScript is not a function", which brings me back to the aforementioned StackOverflow thread that made me feel like the huh? cat.
I did try @eggdesign's featured tags code as an alternative but either I'm incapable of running even that one or it is simply not compatible with @mournstera's base code, which I'm using.
If anyone has ideas on how to fix the converted code to make it work, I'm glad to hear your suggestions, it can only get better and I thank you in advance for offering your time and skill to help.
TL;DR: I'm once again losing the fight against the boss (JS + jQuery) and I'm handing the controller (bad code) to a cousin (incredible people on this site) to beat him.













