$(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",
- value: from,
- title: "Edit the page"});
+ value: "Edit the page"});
$(editButton).click(function () {
- alert("not implemented");
+ Rakka.editPage(from);
});
var box
= $.P({className: "redirection"},
- "This page is redirected from ", editButton, ".");
+ "This page has been redirected from “" + from + "”.", editButton);
$("div.title").after(box);
}
+
});
\ No newline at end of file