diff --git a/ext/upload/theme.php b/ext/upload/theme.php index a86d6f58..0c5b0686 100644 --- a/ext/upload/theme.php +++ b/ext/upload/theme.php @@ -63,7 +63,8 @@ class UploadTheme extends Themelet { if($tl_enabled) { $link = make_http(make_link("upload")); - $title = "Upload to " . $config->get_string('title'); + $home = make_http(make_link()); + $title = $config->get_string('title'); if($config->get_bool('nice_urls')){ $delimiter = '?'; @@ -71,9 +72,9 @@ class UploadTheme extends Themelet { $delimiter = '&'; } - $html .= '
' . - $title . ' (Drag & drop onto your bookmarks toolbar, then click when looking at an image)'; + $js='javascript:(function(){if(typeof window=="undefined"||!window.location||window.location.href=="about:blank"){window.location="'. $home .'";}else if(typeof document=="undefined"||!document.body){window.location="'. $home .'?url="+encodeURIComponent(window.location.href);} else if(window.location.href.match("\/\/'. $_SERVER["HTTP_HOST"] .'.*")){alert("You are already at '. $title .'!");} else{var tags=prompt("Please enter tags","tagme");if(tags!=""&&tags!=null){var link="'. $link . $delimiter .'url="+location.href+"&tags="+tags;var w=window.open(link,"_blank");}}})();'; + + $html .= '
Upload to '.$title.' (Drag & drop onto your bookmarks toolbar, then click when looking at an image)'; } $page->set_title("Upload");