Skip to content

Instantly share code, notes, and snippets.

@rcherny
Forked from Doff3n/WCMMode
Created March 12, 2021 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rcherny/b4e999edcaa137bca448cd7d12635ea6 to your computer and use it in GitHub Desktop.
Save rcherny/b4e999edcaa137bca448cd7d12635ea6 to your computer and use it in GitHub Desktop.
WCMMode bookmarklet toggle for AEM 6.0
javascript:(function() { document.location = (document.location.href.search(/[?&]wcmmode=disabled/) < 0 ? document.location.href + (document.location.href.indexOf('?') < 0 ? '?' : (document.location.href.search(/\?./) < 0 ? '' : '&')) + 'wcmmode=disabled' : document.location.toString().replace(/wcmmode=disabled&?/, '')).replace(/[?&]$/, '');if(window.location.href.indexOf("cf#") > -1){location.reload();}})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment