diff --git a/acrobat/blocks/verb-widget/verb-widget.js b/acrobat/blocks/verb-widget/verb-widget.js index cb86e967..cc54d9e0 100644 --- a/acrobat/blocks/verb-widget/verb-widget.js +++ b/acrobat/blocks/verb-widget/verb-widget.js @@ -1,37 +1,13 @@ import LIMITS from './limits.js'; -import { setLibs, getEnv, isOldBrowser } from '../../scripts/utils.js'; +import { setLibs, isOldBrowser } from '../../scripts/utils.js'; import verbAnalytics from '../../scripts/alloy/verb-widget.js'; const miloLibs = setLibs('/libs'); const { createTag } = await import(`${miloLibs}/utils/utils.js`); -const fallBack = 'https://www.adobe.com/go/acrobat-overview'; const EOLBrowserPage = 'https://acrobat.adobe.com/home/index-browser-eol.html'; -const verbRedirMap = { - createpdf: 'createpdf', - 'crop-pages': 'crop', - 'delete-pages': 'deletepages', - 'extract-pages': 'extract', - 'combine-pdf': 'combine', - 'protect-pdf': 'protect', - 'add-comment': 'addcomment', - 'pdf-to-image': 'pdftoimage', - 'reorder-pages': 'reorderpages', - sendforsignature: 'sendforsignature', - 'rotate-pages': 'rotatepages', - fillsign: 'fillsign', - 'split-pdf': 'split', - 'insert-pdf': 'insert', - 'compress-pdf': 'compress', - 'png-to-pdf': 'jpgtopdf', - 'number-pages': 'number', - 'ocr-pdf': 'ocr', - 'chat-pdf': 'chat', - 'chat-pdf-student': 'study', -}; - // const handleError = (err, errTxt, str, strTwo) => { // err.classList.add('verb-error'); // err.classList.remove('hide'); @@ -73,19 +49,6 @@ const setDraggingClass = (widget, shouldToggle) => { shouldToggle ? widget.classList.add('dragging') : widget.classList.remove('dragging'); }; -function redDir(verb) { - const hostname = window?.location?.hostname; - const ENV = getEnv(); - const VERB = verb; - let newLocation; - if (hostname !== 'www.adobe.com' && hostname !== 'sign.ing' && hostname !== 'edit.ing') { - newLocation = `https://www.adobe.com/go/acrobat-${verbRedirMap[VERB] || VERB.split('-').join('')}-${ENV}`; - } else { - newLocation = `https://www.adobe.com/go/acrobat-${verbRedirMap[VERB] || VERB.split('-').join('')}` || fallBack; - } - window.location.href = newLocation; -} - export default async function init(element) { if (isOldBrowser()) { window.location.href = EOLBrowserPage; @@ -176,10 +139,4 @@ export default async function init(element) { setDraggingClass(widget, false); } }); - - window.addEventListener('IMS:Ready', async () => { - if (window.adobeIMS.isSignedInUser()) { - redDir(VERB); - } - }); }