Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
February 8Feb 8 17 hours ago, Matt said:Same steps as above, the JS is:I think that needs an additional condition to only show for members, doesn’t it?
March 1Mar 1 On 2/7/2025 at 7:15 AM, Matt said:Yeah, it's super easy in Invision Community 5. Barely an inconvenience.The javascript I paste in is this:<script type="text/javascript"> document.addEventListener("DOMContentLoaded", function () { let newLi = document.createElement("li"); let newLink = document.createElement("a"); newLink.href = "#"; newLink.innerText = "Back to Top"; newLink.setAttribute( 'style', 'padding: .8em'); let newIcon = document.createElement("i"); newIcon.classList.add("fa", "fa-arrow-up"); newLink.prepend(newIcon); newLink.addEventListener("click", function (event) { event.preventDefault(); window.scrollTo({ top: 0, behavior: "smooth" }); }); newLi.appendChild(newLink); let ul = document.querySelector('nav.ipsBreadcrumb--bottom a[data-action="defaultStream"]').closest("ul"); if (ul) { ul.appendChild(newLi); } }); </script>On 2/7/2025 at 8:00 AM, Matt said:Same steps as above, the JS is:<script type="text/javascript"> document.addEventListener("DOMContentLoaded", function () { let newLi = document.createElement("li"); let newLink = document.createElement("a"); newLink.href = ipsSettings.baseURL + 'markallread/?csrfKey=' + ipsSettings.csrfKey; newLink.innerText = "Mark Site Read"; newLink.setAttribute( 'style', 'padding: .8em'); let newIcon = document.createElement("i"); newIcon.classList.add("fa", "fa-solid", "fa-eye"); newLink.prepend(newIcon); newLi.appendChild(newLink); let ul = document.querySelector('nav.ipsBreadcrumb--bottom a[data-action="defaultStream"]').closest("ul"); if (ul) { ul.appendChild(newLi); } }); </script>I did it first without recording, then removed it but didn't refresh the page before recording, that's all.@Matt This then leaves a small blank area where the Text Block is, within the footer. Any way to make that go away?
March 1Mar 1 4 hours ago, My Sharona said:@Matt This then leaves a small blank area where the Text Block is, within the footer. Any way to make that go away?I guessing that nothing should be displayed because the only time that there would be padding or margin is when a style is defined or when the browser has a defined style such as for a div tag. If there is padding or a margin, you could probably target it via a section if or class from that area.
March 2Mar 2 14 hours ago, EDK-Tech said:I guessing that nothing should be displayed because the only time that there would be padding or margin is when a style is defined or when the browser has a defined style such as for a div tag. If there is padding or a margin, you could probably target it via a section if or class from that area.Thank you. Setting the padding to none got rid of the display.