diff --git a/head.sub.php b/head.sub.php index 50917e9f7..7609d275b 100644 --- a/head.sub.php +++ b/head.sub.php @@ -81,7 +81,6 @@ if ($is_admin) { set_cookie("device_width", $(window).width(), 6, g5_cookie_domain); '.PHP_EOL; echo ''.PHP_EOL; // overflow scroll 감지 } //if(!defined('G5_IS_ADMIN')) diff --git a/js/viewimageresize.js b/js/viewimageresize.js index 40e436143..7893ae45c 100644 --- a/js/viewimageresize.js +++ b/js/viewimageresize.js @@ -14,10 +14,12 @@ } var $img = this.find(cfg.selector); - var width = this.width(); + var $this = this; function image_resize() { + var width = $this.width(); + $img.each(function() { $(this).removeAttr("width") .removeAttr("height") diff --git a/lib/thumbnail.lib.php b/lib/thumbnail.lib.php index e6f7b05ff..337b92d42 100644 --- a/lib/thumbnail.lib.php +++ b/lib/thumbnail.lib.php @@ -80,27 +80,8 @@ function get_view_thumbnail($contents, $thumb_width=0) { global $board, $config; - if (!$thumb_width) { - $dvc_width = intval($_COOKIE['device_width']); - if(G5_IS_MOBILE && $dvc_width) { - // 썸네일 width 설정 - $thumb_width = 320; - - if($dvc_width > $board['bo_image_width']) { - $thumb_width = $board['bo_image_width']; - } else { - if($dvc_width >= 1000) { - $thumb_width = 1000; - } else if($dvc_width >= 760 && $dvc_width < 1000) { - $thumb_width = 760; - } else if($dvc_width >= 480 && $dvc_width < 760) { - $thumb_width = 480; - } - } - } else { - $thumb_width = $board['bo_image_width']; - } - } + if (!$thumb_width) + $thumb_width = $board['bo_image_width']; // $contents 중 img 태그 추출 $matchs = get_editor_image($contents); diff --git a/mobile/head.php b/mobile/head.php index aa323232d..0f4481fb3 100644 --- a/mobile/head.php +++ b/mobile/head.php @@ -107,7 +107,8 @@ include_once(G5_LIB_PATH.'/popular.lib.php');