changeset 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 71fdd9ee5a29
files app/assets/javascripts/init.tabs.js
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/app/assets/javascripts/init.tabs.js	Mon Nov 12 13:35:11 2012 +0700
+++ b/app/assets/javascripts/init.tabs.js	Mon Nov 12 13:36:38 2012 +0700
@@ -12,8 +12,11 @@
         mode = paste.data('mode'),
         width = paste.data('width'),
         qstring = '?' + mode + '.' + width;
-      if ((mode == 'plain') && (width == 'auto')) {
+      if (width == 'auto') {
         qstring = '?';
+        if (mode != 'plain') {
+          qstring += mode;
+        }
       }
       history.replaceState(null, '', qstring);
     };