Skip to content

Commit

Permalink
Merge pull request #810 from adobecom/2438
Browse files Browse the repository at this point in the history
DC Milo 0.2438
  • Loading branch information
Blainegunn authored Sep 17, 2024
2 parents c86adb1 + 5b63036 commit 1951099
Show file tree
Hide file tree
Showing 44 changed files with 2,933 additions and 256 deletions.
5 changes: 3 additions & 2 deletions acrobat/blocks/dc-converter-widget/dc-converter-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,9 @@ export default async function init(element) {
dropZone.innerHTML = '<img src="/acrobat/img/icons/error.svg"><p>We apologize for the inconvenience. We are working hard to make the service available. Please check back shortly.</p>';
document.querySelector('div[class*="DropZoneFooter__dropzoneFooter"]').innerHTML = '';
}
const { message, name, type } = err.detail?.wrappedException || {};
const info = `DC Widget failed. type=${type} name=${name} message=${message}`;
const { cause, message, name, type } = err.detail?.wrappedException || {};
// eslint-disable-next-line prefer-template
const info = `DC Widget failed. type=${type} name=${name} message=${message}` + (cause ? ` cause.message=${cause.message}` : '');
window.lana?.log(info, lanaOptions);
});
}
21 changes: 1 addition & 20 deletions acrobat/blocks/mobile-widget/mobile-widget.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import mobileAnalytics from '../../scripts/alloy/mobile-widget.js';
import mobileAnalyticsShown from '../../scripts/alloy/mobile-widget-shown.js';
import { getEnv, isOldBrowser } from '../../scripts/utils.js';

const verbRedirMap = {
createpdf: 'createpdf',
Expand Down Expand Up @@ -31,26 +32,6 @@ const verbRedirMapAnalytics = {
const EOLBrowserPage = 'https://acrobat.adobe.com/home/index-browser-eol.html';
const fallBack = 'https://www.adobe.com/go/acrobat-overview';

function getEnv() {
const prodHosts = ['www.adobe.com', 'sign.ing', 'edit.ing'];
const stageHosts = [
'stage--dc--adobecom.hlx.page', 'main--dc--adobecom.hlx.page',
'stage--dc--adobecom.hlx.live', 'main--dc--adobecom.hlx.live',
'www.stage.adobe.com',
];

if (prodHosts.includes(window.location.hostname)) return 'prod';
if (stageHosts.includes(window.location.hostname)) return 'stage';
return 'dev';
}

function isOldBrowser() {
const { name, version } = window?.browser || {};
return (
name === 'Internet Explorer' || (name === 'Microsoft Edge' && (!version || version.split('.')[0] < 86)) || (name === 'Safari' && version.split('.')[0] < 14)
);
}

function redDir(verb) {
if (isOldBrowser()) {
window.location.href = EOLBrowserPage;
Expand Down
Loading

0 comments on commit 1951099

Please sign in to comment.