MutationObserver Promise made easy
When adding a new feature to my Nifty Sitecore Userscript I noticed a lot of similar code to initiate one-time MutationObserver
s and disbanding them again after the Mutation was Observed. Clearly, a refactor was in order.
tags: Front-end - Javascript
28 December 2020
Admin-panel to whitelist IP's for identity server
One of our clients wanted to be sure that only white-listed IP’s can log into Sitecore to manage their site. We solved this by utilizing IIS’s IP Address and Domain Restrictions feature on the Sitecore Identity Server. That way adding or removing an IP only restarts the app-pool for the Identity Server, not the Sitecore instance. Annoyingly this has meant that every so often I have to log into the production server just to add an IP address to IIS, until I made this admin-page that let’s anyone with the developer role in Sitecore do this without all the hassle.
tags: Sitecore - C# - Back-end
12 September 2020
Using jQuery without breaking Sitecore 9 Forms validation
If the front-end code of you Sitecore 9 site is using jQuery, you might have run into some issues on pages with Sitecore Forms. This is because vanilla Sitecore Forms uses an unobtrusive form validation library that’s dependent on jQuery, but might not use the same version of jQuery that you wanna use in your front-end. jQuery has a .noConflict()
method to deal with this, but how do you actually properly use it?
tags: Sitecore - Javascript - Front-end
8 June 2020
Inspecting Jekyll objects for GitHub Pages
This blog runs on GitHub Pages, which is powered by Jekyll. Jekyll generates the website as static html based on html templates, scss and markdown files. The templating system used is Liquid which has its own Liquid code to which Jekyll exposes some objects that you can use to iterate posts and tags etc. But because this code is run when regenerating the static html, you can’t easily debug and step through this code.
tags: Jekyll - Javascript
26 May 2020
Introducing nifty Sitecore userscript and filtering MutationObserver events
Like I’m sure many developers, when I use the same tool a lot I start see possibilities for improvement to suite my workflow. So too with the Sitecore client. So to automate everything I find myself doing twice, to the Tampermobile!
tags: Sitecore - Front-end - Javascript