Mercurial > zeropaste
comparison app/assets/javascripts/init.tabs.js @ 115:546381cf83c2
auto sounds better than full.
author | Edho Arief <edho@myconan.net> |
---|---|
date | Mon, 12 Nov 2012 13:35:11 +0700 |
parents | b72f99d7b8cf |
children | 9ac24e112ea7 |
comparison
equal
deleted
inserted
replaced
114:b72f99d7b8cf | 115:546381cf83c2 |
---|---|
10 update_state = function() { | 10 update_state = function() { |
11 var paste = $('#paste'), | 11 var paste = $('#paste'), |
12 mode = paste.data('mode'), | 12 mode = paste.data('mode'), |
13 width = paste.data('width'), | 13 width = paste.data('width'), |
14 qstring = '?' + mode + '.' + width; | 14 qstring = '?' + mode + '.' + width; |
15 if ((mode == 'plain') && (width == 'full')) { | 15 if ((mode == 'plain') && (width == 'auto')) { |
16 qstring = '?'; | 16 qstring = '?'; |
17 } | 17 } |
18 history.replaceState(null, '', qstring); | 18 history.replaceState(null, '', qstring); |
19 }; | 19 }; |
20 | 20 |
21 paste_resize = function(size) { | 21 paste_resize = function(size) { |
22 var paste = $('#paste'), | 22 var paste = $('#paste'), |
23 title = $('#tab-resize a.btn'); | 23 title = $('#tab-resize a.btn'); |
24 title.html(title.html().replace(/(full|\d+px)/, size)); | 24 title.html(title.html().replace(/(auto|\d+px)/, size)); |
25 if (size == 'full') { | 25 if (size == 'auto') { |
26 paste.css('width', ''); | 26 paste.css('width', ''); |
27 paste.data('width', size); | 27 paste.data('width', size); |
28 } else { | 28 } else { |
29 paste.css('width', size); | 29 paste.css('width', size); |
30 paste.data('width', size); | 30 paste.data('width', size); |