return [null,null];
}
-function parse_image_num(default_value) {
- var num = parseInt(window.location.hash.substr(1));
- if (num >= 1 && num <= global_image_list.length) { // and then num != NaN
- return (num - 1);
- } else {
- return default_value;
- }
-}
-
/*
* pr0n can resize to any size we'd like, but we're much more likely
* to have this set of fixed-resolution screens cached, so to increase
center_image(num);
// replace the anchor part (if any) with the image number
- var baseurl = (window.location.toString().split("#"))[0];
- window.location = baseurl + "#" + (num+1);
+ window.location.hash = "#" + (num+1);
}
return img;
}
}
-function check_for_hash_change() {
+function parse_image_num(default_value) {
var num = parseInt(window.location.hash.substr(1));
if (num >= 1 && num <= global_image_list.length) { // and then num != NaN
- if (--num != global_image_num) {
- global_image_num = num;
- relayout();
- }
+ return (num - 1);
+ } else {
+ return default_value;
+ }
+}
+
+function check_for_hash_change() {
+ var num = parse_image_num(-1);
+ if (num != -1 && num != global_image_num) {
+ global_image_num = num;
+ relayout();
}
}