Explorar o código

convert %23 symbol in URL
for example #WHU3S6%2311 will become #WHU3S6#11

Avin Grape %!s(int64=5) %!d(string=hai) anos
pai
achega
21c1d12589
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      Playground/js/main.js

+ 5 - 0
Playground/js/main.js

@@ -1073,6 +1073,11 @@ class Main {
             }
         }
         if (pgHash) {
+            var match = pgHash.match(/^(#[A-Z\d]*)(%23)([\d]+)$/);
+            if (match){
+                pgHash = match[1]+'#'+match[3];
+                parent.location.hash = pgHash;
+            }
             this.previousHash = pgHash;
             this.loadPlayground(pgHash.substr(1))
         }