diff 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
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);
     };