diff --git a/src/demos/storage-access-api/index.ejs b/src/demos/storage-access-api/index.ejs
index 5604b62..5946816 100644
--- a/src/demos/storage-access-api/index.ejs
+++ b/src/demos/storage-access-api/index.ejs
@@ -1,5 +1,9 @@
<%- include(commonPath + '/header.ejs') %>
<%- include(commonPath + '/internal-page/header.ejs') %>
-
+
<%- include(commonPath + '/internal-page/footer.ejs') %>
<%- include(commonPath + '/footer.ejs') %>
diff --git a/src/demos/storage-access-api/personalization.ejs b/src/demos/storage-access-api/personalization.ejs
index 91f9c0a..340ddb4 100644
--- a/src/demos/storage-access-api/personalization.ejs
+++ b/src/demos/storage-access-api/personalization.ejs
@@ -17,7 +17,6 @@ document.addEventListener('DOMContentLoaded', () => {
})
async function updateUserPreference() {
- console.log('hasStorageAccess', hasStorageAccess);
if ( hasStorageAccess ) {
fetchAndApplyTheme();
} else {
@@ -27,8 +26,7 @@ document.addEventListener('DOMContentLoaded', () => {
loadButton.classList.add('hidden');
fetchAndApplyTheme();
} catch (error) {
- console.error('There has been a problem with your fetch operation:', error);
- errorMessages.textContent = `Error: ${error}`;
+ errorMessages.textContent = error?.message;
}
}
}
@@ -48,14 +46,12 @@ document.addEventListener('DOMContentLoaded', () => {
.then(data => {
const theme = data.theme;
pageContainer.className = `${containerClass} ${data.theme}`
- console.log('theme', theme);
if (theme === 'dark') {
themeSwitcher.checked = true;
}
})
.catch(error => {
- console.error('There has been a problem with your fetch operation:', error);
- errorMessages.textContent = `Error: ${error.message}`;
+ errorMessages.textContent = error?.message;
});
}
@@ -83,11 +79,9 @@ document.addEventListener('DOMContentLoaded', () => {
if ( await document.hasStorageAccess() ) {
fetchSetPersonalization();
} else {
- console.error('User denied storage access');
errorMessages.textContent = 'User denied storage access';
}
} catch (error) {
- console.error('Error:', error);
errorMessages.textContent = `The request to storage access API was denied because the user never interacted with the top-level site context or the permission wasn't grant by the user`;
}
}
@@ -95,7 +89,6 @@ document.addEventListener('DOMContentLoaded', () => {
window.toggleTheme = toggleTheme;
if (isIframe && !hasStorageAccess) {
- console.log('In iframe');
toggleContainer.classList.add('hidden');
loadButton.classList.remove('hidden');
loadButton.addEventListener('click', updateUserPreference);
diff --git a/src/scenarios/ecommerce/routes.js b/src/scenarios/ecommerce/routes.js
index d725f52..2ee10a5 100644
--- a/src/scenarios/ecommerce/routes.js
+++ b/src/scenarios/ecommerce/routes.js
@@ -6,7 +6,7 @@ const router = express.Router();
// Middleware to setup common rendering variables
router.use((req, res, next) => {
// Set common variables for rendering views
- res.locals.title = 'E-Commerce - Privacy Sandbox' // Set the page title
+ res.locals.title = 'Shopping Cart' // Set the page title
next(); // Continue to the next middleware or route handler
});
diff --git a/src/scenarios/personalization/personalization.ejs b/src/scenarios/personalization/personalization.ejs
index df30077..3247e06 100644
--- a/src/scenarios/personalization/personalization.ejs
+++ b/src/scenarios/personalization/personalization.ejs
@@ -23,7 +23,6 @@ document.addEventListener('DOMContentLoaded', () => {
}
})
.catch(error => {
- console.error('There has been a problem with your fetch operation:', error);
statusMessage.textContent = `There was an error fetching your personalization settings: ${error.message}`;
});
}
@@ -44,7 +43,6 @@ document.addEventListener('DOMContentLoaded', () => {
.then(data => {
pageContainer.className = data.theme;
}).catch(error => {
- console.error('There has been a problem with your fetch operation:', error);
statusMessage.textContent = `There was an error updating your personalization settings: ${error.message}`;
});
}