Skip to content

Commit

Permalink
Merge pull request #867 from adobecom/MWPW-160726_
Browse files Browse the repository at this point in the history
MWPW-160726
  • Loading branch information
Blainegunn authored Oct 22, 2024
2 parents 0b65baa + ea0d733 commit cf83488
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion acrobat/blocks/verb-widget/verb-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ export default async function init(element) {
return;
}

const ENV = getEnv();
const { locale } = getConfig();
const ppURL = window.mph['verb-widget-privacy-policy-url'] || `https://www.adobe.com${locale.prefix}/privacy/policy.html`;
const touURL = window.mph['verb-widget-terms-of-use-url'] || `https://www.adobe.com${locale.prefix}/legal/terms.html`;
Expand Down Expand Up @@ -250,6 +249,12 @@ export default async function init(element) {
verbAnalytics('job:uploading', VERB, e.detail?.data);
setUser();
document.cookie = `UTS_Uploading=${Date.now()};domain=.adobe.com;path=/;expires=${cookieExp}`;

window.addEventListener('beforeunload', (w) => {
w.preventDefault();
// Included for legacy support, e.g. Chrome/Edge < 119
w.returnValue = true;
});
}

if (e.detail?.event === 'uploaded') {
Expand Down

0 comments on commit cf83488

Please sign in to comment.