Closed R-Tomas-Gonzalez closed 4 months ago
Prevent banner links from opening in new windows.
Changes what is considered an external link. Looks for the host name with or without www., then opens in new window if it isn't matching to the document's host.
A) If you'd like to troubleshoot in TUP-UI Repo:
B) If you'd like to just test these changes in TUP-UI using Core_CMS
…
The shouldForceSetTarget function below:
shouldForceSetTarget
const shouldForceSetTarget = pathsToForceSetTarget.some(path => { let shouldForce; if (path instanceof RegExp) { shouldForce = path.test(link.pathname); } if (typeof path === 'string') { shouldForce = _doPathsMatch(path, link.pathname); } if (SHOULD_DEBUG && shouldForce) { console.debug(`Path "${link.pathname}" matches "${path}"`); } return shouldForce; });
does not allow external links to open in a new window.
For instance. If you're in localhost, and have a tacc.utexas.edu link - it should open in a new window because it doesn't match the host.
tacc.utexas.edu
This might be something you test in tup-ui repo using the A) testing steps above
Overview
Prevent banner links from opening in new windows.
Related
Changes
Changes what is considered an external link. Looks for the host name with or without www., then opens in new window if it isn't matching to the document's host.
Testing
A) If you'd like to troubleshoot in TUP-UI Repo:
B) If you'd like to just test these changes in TUP-UI using Core_CMS
UI
…
Notes
The
shouldForceSetTarget
function below:does not allow external links to open in a new window.
For instance. If you're in localhost, and have a
tacc.utexas.edu
link - it should open in a new window because it doesn't match the host.This might be something you test in tup-ui repo using the A) testing steps above