Custom HTML doesn't work with 9.2.1

Kathryn Reddie
Contributor
March 2, 2025

Hi all,

Just wondering if anyone knows what I need to amend to get my custom html (below) working again with the update to 9.2.1?

I've copied in the full code from Custom HTML > "At end of the BODY" in the first comment below.

AJS.toInit(function(){ AJS.$('.rw_row_1.rw_header_row').prepend('

'); AJS.$(".external-link").attr("target", "_blank"); })Custom HTML doesnt work with 9-2-1.jpg

1 answer

0 votes
Kathryn Reddie
Contributor
March 2, 2025

--Full Custom HTML that is located "At end of the BODY"

<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-5VRPRW3');</script>
<!-- End Google Tag Manager -->

<script>

!function (t) { "use strict"; "function" == typeof define && define.amd ? define(["jquery"], t) : "undefined" != typeof module && module.exports ? module.exports = t(require("jquery")) : t(jQuery) }(function (t) {
var e = -1, o = -1, i = function (t) { return parseFloat(t) || 0 }, a = function (e) { var o = 1, a = t(e), n = null, r = []; return a.each(function () { var e = t(this), a = e.offset().top - i(e.css("margin-top")), s = r.length > 0 ? r[r.length - 1] : null; null === s ? r.push(e) : Math.floor(Math.abs(n - a)) <= o ? r[r.length - 1] = s.add(e) : r.push(e), n = a }), r }, n = function (e) {
var o = {
byRow: !0, property: "height", target: null, remove: !1
}; return "object" == typeof e ? t.extend(o, e) : ("boolean" == typeof e ? o.byRow = e : "remove" === e && (o.remove = !0), o)
}, r = t.fn.matchHeight = function (e) { var o = n(e); if (o.remove) { var i = this; return this.css(o.property, ""), t.each(r._groups, function (t, e) { e.elements = e.elements.not(i) }), this } return this.length <= 1 && !o.target ? this : (r._groups.push({ elements: this, options: o }), r._apply(this, o), this) }; r.version = "0.7.0", r._groups = [], r._throttle = 80, r._maintainScroll = !1, r._beforeUpdate = null,
r._afterUpdate = null, r._rows = a, r._parse = i, r._parseOptions = n, r._apply = function (e, o) {
var s = n(o), h = t(e), l = [h], c = t(window).scrollTop(), p = t("html").outerHeight(!0), d = h.parents().filter(":hidden"); return d.each(function () { var e = t(this); e.data("style-cache", e.attr("style")) }), d.css("display", "block"), s.byRow && !s.target && (h.each(function () {
var e = t(this), o = e.css("display"); "inline-block" !== o && "flex" !== o && "inline-flex" !== o && (o = "block"), e.data("style-cache", e.attr("style")), e.css({
display: o, "padding-top": "0",
"padding-bottom": "0", "margin-top": "0", "margin-bottom": "0", "border-top-width": "0", "border-bottom-width": "0", height: "100px", overflow: "hidden"
})
}), l = a(h), h.each(function () { var e = t(this); e.attr("style", e.data("style-cache") || "") })), t.each(l, function (e, o) {
var a = t(o), n = 0; if (s.target) n = s.target.outerHeight(!1); else {
if (s.byRow && a.length <= 1) return void a.css(s.property, ""); a.each(function () {
var e = t(this), o = e.attr("style"), i = e.css("display"); "inline-block" !== i && "flex" !== i && "inline-flex" !== i && (i = "block"); var a = {
display: i
}; a[s.property] = "", e.css(a), e.outerHeight(!1) > n && (n = e.outerHeight(!1)), o ? e.attr("style", o) : e.css("display", "")
})
} a.each(function () { var e = t(this), o = 0; s.target && e.is(s.target) || ("border-box" !== e.css("box-sizing") && (o += i(e.css("border-top-width")) + i(e.css("border-bottom-width")), o += i(e.css("padding-top")) + i(e.css("padding-bottom"))), e.css(s.property, n - o + "px")) })
}), d.each(function () { var e = t(this); e.attr("style", e.data("style-cache") || null) }), r._maintainScroll && t(window).scrollTop(c / p * t("html").outerHeight(!0)),
this
}, r._applyDataApi = function () { var e = {}; t("[data-match-height], [data-mh]").each(function () { var o = t(this), i = o.attr("data-mh") || o.attr("data-match-height"); i in e ? e[i] = e[i].add(o) : e[i] = o }), t.each(e, function () { this.matchHeight(!0) }) }; var s = function (e) { r._beforeUpdate && r._beforeUpdate(e, r._groups), t.each(r._groups, function () { r._apply(this.elements, this.options) }), r._afterUpdate && r._afterUpdate(e, r._groups) }; r._update = function (i, a) {
if (a && "resize" === a.type) {
var n = t(window).width(); if (n === e) return; e = n;
} i ? -1 === o && (o = setTimeout(function () { s(a), o = -1 }, r._throttle)) : s(a)
}, t(r._applyDataApi), t(window).bind("load", function (t) { r._update(!1, t) }), t(window).bind("resize orientationchange", function (t) { r._update(!0, t) })
});

$(function () {
$('.icon-widget').matchHeight();

AJS.bind('rw-categories:menu-loaded', function (e, $el, categories) {
for (var i = 0; i < $('#rw_category_menu .rw_category_items li').length; i++) {
var menuItem = $('#rw_category_menu .rw_category_items li')[i];
if (window.location.href.endsWith($(menuItem).find('a').attr('href'))) {
$(menuItem).addClass('rw_active');
} else {
$(menuItem).removeClass('rw_active');
}
}
});
});


</script>

<script>

AJS.toInit(function(){
AJS.$('.rw_row_1.rw_header_row').prepend('<div class="topNavLeft"><ul class="topNav"><li><a href="https://intranet.dha.gov.au">DHAsi</a></li><li><a href="https://intranet.dha.gov.au/display/KB">Knowledge Base</a></li><li><a href="https://workflowds.dha.gov.au/servicedesk/customer/portal/1/group/387">Get IT Help</a></li></ul></div>');
AJS.$(".external-link").attr("target", "_blank");
});


</script>

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events