diff app/assets/javascripts/zp.hash_magic.js @ 264:fa4a1ba990ae

Simplified pastes#show view.
author edogawaconan <me@myconan.net>
date Wed, 16 Oct 2013 02:19:36 +0900
parents a9c45375a656
children 77c157a9e645
line wrap: on
line diff
--- a/app/assets/javascripts/zp.hash_magic.js	Wed Oct 16 01:55:23 2013 +0900
+++ b/app/assets/javascripts/zp.hash_magic.js	Wed Oct 16 02:19:36 2013 +0900
@@ -3,9 +3,8 @@
   window.zp.hash_magic = {
     load_hash: function() {
       var format = window.location.hash.slice(1)
-      if (format !== undefined) {
-        zp.formatter.links().filter("[href=#" + format + "]").click()
-      }
+      if (format == "") format = "pl"
+      zp.formatter.links().filter("[href=#" + format + "]").tab('show')
     },
     set_hash: function(e) {
       if (typeof e !== "undefined") {