comparison app/assets/javascripts/init.tabs.js @ 116:9ac24e112ea7

A more compact query string.
author Edho Arief <edho@myconan.net>
date Mon, 12 Nov 2012 13:36:38 +0700
parents 546381cf83c2
children e3f3402da5a1
comparison
equal deleted inserted replaced
115:546381cf83c2 116:9ac24e112ea7
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 == 'auto')) { 15 if (width == 'auto') {
16 qstring = '?'; 16 qstring = '?';
17 if (mode != 'plain') {
18 qstring += mode;
19 }
17 } 20 }
18 history.replaceState(null, '', qstring); 21 history.replaceState(null, '', qstring);
19 }; 22 };
20 23
21 paste_resize = function(size) { 24 paste_resize = function(size) {