Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Drop this inside a <script> tag in a Content Editor Web Part to redirect a page to another URL without creating an entry in the browser history. Based on a blog post I wrote at and @PathToSharePoint's easy tabs script to detect whether a page is in edit mode.
;( function() {
if ( document.forms[0].elements["_wikiPageMode.value"] == "true" || document.forms[0].elements["MSOLayout_InDesignMode"].value == "1") {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment