Mercurial > zeropaste
comparison app/assets/javascripts/init.tabs.js @ 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 | b56ad3caed6d |
comparison
equal
deleted
inserted
replaced
| 140:13ada93ad6a2 | 141:2104f0c477c0 |
|---|---|
| 11 qstring = '#!'; | 11 qstring = '#!'; |
| 12 if (mode != 'plain') { | 12 if (mode != 'plain') { |
| 13 qstring += mode; | 13 qstring += mode; |
| 14 } | 14 } |
| 15 } | 15 } |
| 16 window.location = qstring; | 16 if (history.replaceState) { |
| 17 history.replaceState(null, '', qstring); | |
| 18 } else { | |
| 19 window.location = qstring; | |
| 20 } | |
| 17 return false; | 21 return false; |
| 18 }, | 22 }, |
| 19 paste_resize = function(size) { | 23 paste_resize = function(size) { |
| 20 var paste = $('#paste'), | 24 var paste = $('#paste'), |
| 21 title = $('#paste-resize a.btn'); | 25 title = $('#paste-resize a.btn'); |
