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
var url = "http://" + global_vhost + "/" + evt + "/" + width + "x" + height + "/nobox/" + filename;
var main = document.getElementById("iehack");
var img = replace_image_element(url, element_id, main);
+ img.style.position = "absolute";
+ img.style.left = "0px";
+ img.style.top = "0px";
- if (global_infobox != 'nobox') {
+ if (global_infobox != 'nobox/') {
var url = "http://" + global_vhost + "/" + evt + "/" + width + "x" + height + "/box/" + filename;
var boximg = replace_image_element(url, element_id + "_box", main);
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();
}
}