diff app/assets/javascripts/zp.hash_magic.js @ 232:e3468efc9ec9

Do check if we're on the right place
author Edho Arief <edho@myconan.net>
date Sat, 25 May 2013 12:15:27 +0900
parents 6e9718a1ee11
children a9c45375a656
line wrap: on
line diff
--- a/app/assets/javascripts/zp.hash_magic.js	Wed May 15 14:33:35 2013 +0900
+++ b/app/assets/javascripts/zp.hash_magic.js	Sat May 25 12:15:27 2013 +0900
@@ -29,6 +29,7 @@
       history.replaceState(null, "", hash)
     },
     init: function() {
+      if (!$("#paste").length) return
       this.load_hash()
       if (history.replaceState) {
         this.set_hash()