Mercurial > zeropaste
changeset 141:2104f0c477c0
Use replaceState afterall for browsers supporting it.
Reduces history clutter.
| author | Edho Arief <edho@myconan.net> | 
|---|---|
| date | Mon, 12 Nov 2012 17:54:59 +0700 | 
| parents | 13ada93ad6a2 | 
| children | 113ee07f1871 | 
| files | app/assets/javascripts/init.tabs.js | 
| diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] | 
line wrap: on
 line diff
--- a/app/assets/javascripts/init.tabs.js Mon Nov 12 17:51:53 2012 +0700 +++ b/app/assets/javascripts/init.tabs.js Mon Nov 12 17:54:59 2012 +0700 @@ -13,7 +13,11 @@ qstring += mode; } } - window.location = qstring; + if (history.replaceState) { + history.replaceState(null, '', qstring); + } else { + window.location = qstring; + } return false; }, paste_resize = function(size) {
