Skip to content

Commit

Permalink
Merge pull request #289 from NYPL/DR-3376/optimize-scripts
Browse files Browse the repository at this point in the history
DR-3376: Optimize third party scripts
  • Loading branch information
7emansell authored Feb 10, 2025
2 parents a62ffb9 + ef37713 commit 508cb05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added custom searchbar to handle search submit
- Added new search context and `searchManager` class, implemented on `/collections` page (DR-3365)

### Updated

- Updated 3rd party scripts with explicit loading strategies (DR-3376)

## [0.3.1] 2025-01-30

### Updated
Expand Down
2 changes: 2 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export default async function RootLayout({
{/* <!-- This site is converting visitors into subscribers and customers with OptinMonster - https://optinmonster.com --> */}
<Script
id="optinmonster"
strategy="afterInteractive"
dangerouslySetInnerHTML={{
__html:
"(function(d,u,ac){var s=d.createElement('script');s.type='text/javascript';s.src='https://a.omappapi.com/app/js/api.min.js';s.async=true;s.dataset.user=u;s.dataset.account=ac;d.getElementsByTagName('head')[0].appendChild(s);})(document,12468,1044);",
Expand All @@ -94,6 +95,7 @@ export default async function RootLayout({
<div id="nypl-footer"></div>
<Script
src="https://ds-header.nypl.org/footer.min.js?containerId=nypl-footer"
strategy="lazyOnload"
async
></Script>
<Script
Expand Down

0 comments on commit 508cb05

Please sign in to comment.