# HG changeset patch # User edogawaconan # Date 1413913038 -32400 # Node ID 8b222e3ffe25e86554e01fa161e4f0accb61692b # Parent 3c0b3a38a7fce81d5d3f5ed183d6f8b293eb3dc0 Set lightbox attributes through javascript instead of php. diff -r 3c0b3a38a7fc -r 8b222e3ffe25 index.php --- a/index.php Wed Oct 22 01:36:37 2014 +0900 +++ b/index.php Wed Oct 22 02:37:18 2014 +0900 @@ -42,14 +42,7 @@ // BEGIN UTILITY function h($string) { return htmlspecialchars($string, ENT_QUOTES, "UTF-8"); } function a($string) { return preg_replace("#(%2F)+#", "/", rawurlencode($string)); } - function link_to($target, $title) { - $lightbox = ""; - if (substr($target, -1) !== "/" && preg_match("/(jpe?g|gif|png|webp)$/i", pathinfo($target, PATHINFO_EXTENSION)) === 1) { - $lightbox = ' data-lightbox="aa" data-title="' . h('' . h($target) . "") . '" '; - } - - return('" . h($title) . ""); - } + function link_to($target, $title) { return('' . h($title) . ""); } function human_size($size) { $thousand_units = array("ko", "Mo", "Go", "To", "Po"); @@ -205,5 +198,15 @@ + + +