]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - js/redirection.js
misc changes
[Rakka.git] / js / redirection.js
index 1a0c99b0bf4aceac2dabd0e286bceb81166d4c0a..5ceff2680f4823bb6a0e59893f6a756398a62430 100644 (file)
@@ -1,17 +1,8 @@
 $(document).ready(function () {
-    var fragment;
-    
-    if ($.browser.mozilla) {
-        fragment = window.location.hash; // 何故か勝手に URI デコードされる
-    }
-    else {
-        fragment = decodeURIComponent(window.location.hash);
-    }
 
-    var m = fragment.match(/^#Redirect:(.*)$/);
-    if (m) {
-        var from = m[1];
+    var from = Rakka.getHashedParam("Redirect");
 
+    if (from != null) {
         var editButton
             = $.INPUT({className: "editButton",
                        type:      "button",
@@ -26,4 +17,5 @@ $(document).ready(function () {
 
         $("div.title").after(box);
     }
+
 });
\ No newline at end of file