return [null,null];
}
+function parse_image_num(url, default_value) {
+ var url_array = (window.location.toString().split("#"));
+ if (url_array.length != 2) {
+ return default_value;
+ }
+
+ var num = parseInt(url_array[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
[ 1600, 1200 ],
[ 1400, 1050 ],
[ 1280, 960 ],
+ [ 1152, 864 ],
[ 1024, 768 ],
[ 800, 600 ],
[ 640, 480 ],
// size of the image
center_image(num);
- document.getElementById('linkbg1').href = global_bookmark_url_base + (num+1);
- document.getElementById('linkbg2').href = global_bookmark_url_base + (num+1);
- document.getElementById('linkbg3').href = global_bookmark_url_base + (num+1);
+ // replace the anchor part (if any) with the image number
+ var baseurl = (window.location.toString().split("#"))[0];
+ window.location = baseurl + "#" + (num+1);
}
return img;