Last active
December 13, 2015 22:29
-
-
Save tamewhale/4984917 to your computer and use it in GitHub Desktop.
A bookmarklet for flushing pages in Silverstripe.
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
javascript:(function(){var l=window.location,q="?flush=1";l+="";if(-1!==l.indexOf("?")){q="&flush=1";if(-1!==l.indexOf("flush=1")){q="";}}window.location+=q;})(); |
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
(function () { | |
var q = window.location.search, n = "?flush=1"; | |
// check if there is a query string | |
if (0 === q.length) { | |
n = "&flush=1"; | |
// check if flush is already set | |
if (-1 !== q.indexOf("flush=1")) { | |
n = ""; | |
} | |
} | |
window.location += n; // sets new window location | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment