Created
September 18, 2019 16:42
-
-
Save theopendle/b2f3b2cb255d9fcebb4503408d09fd1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).on('foundation-contentloaded', function() { | |
console.log('previewAssetActions.js loaded'); | |
// Get the path to the AEM asset | |
let assetPath = window.location.pathname.replace('/assetdetails.html', ''); | |
// Modify the href attribute of the Preview toolbar action | |
$('.customization-preview-asset-toolbar-action').attr('href', | |
window.location.origin | |
+ '/bin/imageViewerServlet?assetPath=' | |
+ encodeURIComponent(assetPath)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment