From e284d5daf153717f15ddfdcee6edf56232d3d16e Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 25 Jul 2008 12:58:13 +0200 Subject: [PATCH] Have slightly less irksome anchor parsing in the JavaScript. --- files/pr0n-fullscreen.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/files/pr0n-fullscreen.js b/files/pr0n-fullscreen.js index 1d82ebc..5434a3e 100644 --- a/files/pr0n-fullscreen.js +++ b/files/pr0n-fullscreen.js @@ -41,12 +41,7 @@ function find_width() } 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]); + var num = parseInt(window.location.hash.substr(1)); if (num > 1 && num <= global_image_list.length) { // and then num != NaN return (num - 1); } else { -- 2.39.2