![]() |
|
Snippets |
|
The following bookmarklet toggles between the dev and prod environments. It simply does that by adding or removing the '_dev' suffix before the first ".php" of the URL.
javascript:var parts=location.pathname.match(/(.*?)(_dev)?(\.php.*)/);location.pathname=parts[1]+(parts[2]?'':'_dev')+parts[3]