Skip to content

Commit

Permalink
Merge pull request #15515 from Expensify/Rory-RemoveInlineHelpDotScript
Browse files Browse the repository at this point in the history
[No QA] Remove inline script tag from help site
  • Loading branch information
nathanmetcalf authored Feb 28, 2023
2 parents 411dfc9 + 3b01d3b commit 196e6d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/_includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ <h3>Get Started</h3>
</li>
</ul>

<p class="page-footer__fine-print">&copy;2008-<script type="text/javascript">document.write(new Date().getFullYear());</script> Expensify, Inc.</p>
<p id="footer-copywrite-date" class="page-footer__fine-print"></p>
</div>
</div>

<div class="page-footer__logo">
<img src="/assets/images/expensify-footer-logo.svg" alt="Expensify" />
</div>
</div>
</div>
</div>
7 changes: 7 additions & 0 deletions docs/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,14 @@ function navigateBack() {
setTimeout(toggleHeaderMenu, 250);
}

function injectFooterCopywrite() {
const footer = document.getElementById('footer-copywrite-date');
footer.innerHTML = `&copy;2008-${new Date().getFullYear()} Expensify, Inc.`;
}

window.addEventListener('DOMContentLoaded', () => {
injectFooterCopywrite();

if (window.tocbot) {
window.tocbot.init({
// Where to render the table of contents.
Expand Down

0 comments on commit 196e6d7

Please sign in to comment.