From 319149892408da93fef9496bb67e1f51cf64af76 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 26 Nov 2015 19:03:26 +0100 Subject: [PATCH] When closing fullscreen mode, go back to where we clicked from. --- files/pr0n-fullscreen.js | 6 +++++- perl/Sesse/pr0n/Index.pm | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/files/pr0n-fullscreen.js b/files/pr0n-fullscreen.js index a52bf8b..2601aa1 100644 --- a/files/pr0n-fullscreen.js +++ b/files/pr0n-fullscreen.js @@ -314,7 +314,11 @@ function go_next() function do_close() { - window.location = global_return_url; + if (global_image_num > 0) { + window.location = global_return_url + '#' + (global_image_num + 1); + } else { + window.location = global_return_url; + } } function toggle_optionmenu() diff --git a/perl/Sesse/pr0n/Index.pm b/perl/Sesse/pr0n/Index.pm index 68c6a10..3f9e524 100644 --- a/perl/Sesse/pr0n/Index.pm +++ b/perl/Sesse/pr0n/Index.pm @@ -364,7 +364,7 @@ sub handler { } else { $io->print(" "); } - $io->print("\"\"$imgsz\n"); + $io->print("\"\"$imgsz\n"); if ($rot == 1) { $io->print(" 90