Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View mt33's full-sized avatar

Matthieu Tremblay mt33

  • Montreal, Quebec
View GitHub Profile
@mt33
mt33 / gist:6071040
Last active December 20, 2015 04:29
WCM and CF toggles for CQ/AEM author environments(1) and (2) bookmarklet code for toggling ?wcmmode=disabled and cf#/ from the current browser location.(3) accomplishes the same as (1) but uses a cookie so that a) we don't interfere with the URL and b) the setting is persistent when navigating.Useful for CQ development.
// Note: to make a bookmarklet, take the minified code, place it within the anonymous function
// and paste into the bookmark location
javascript:(function(){/* minifed goes here */}());
// ------------------------------------------------------------------
// (0) Toggle '/editor.html' to the location
// ------------------------------------------------------------------
javascript:(function(){var e="editor.html/";var t=window.location.href;var n="";if(t.indexOf(e)!=-1){n=t.replace(e,"")}else{n=t.replace("content/",e+"content/")}window.location=n})();
// ------------------------------------------------------------------