Fixed issue with Cancelling Transloads.
Also added some features to the Bookmarklet.
This commit is contained in:
parent
57da47c93a
commit
dcf96456f1
@ -98,17 +98,18 @@ class UploadTheme extends Themelet {
|
|||||||
";
|
";
|
||||||
|
|
||||||
if($tl_enabled) {
|
if($tl_enabled) {
|
||||||
$link = make_http(make_link("upload"));
|
$link = make_http(make_link("upload"));
|
||||||
|
$main_page = make_http(make_link());
|
||||||
|
$title = $config->get_string('title');
|
||||||
|
|
||||||
if($config->get_bool('nice_urls')){
|
if($config->get_bool('nice_urls')){
|
||||||
$delimiter = '?';
|
$delimiter = '?';
|
||||||
} else {
|
} else {
|
||||||
$delimiter = '&';
|
$delimiter = '&';
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
$title = "Upload to " . $config->get_string('title');
|
$js='javascript:(function(){if(typeof window=="undefined"||!window.location||window.location.href=="about:blank"){window.location="'. $main_page .'";}else if(typeof document=="undefined"||!document.body){window.location="'. $main_page .'?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 .= '<p><a href="javascript:location.href="' .
|
$html .= '<p><a href=\''.$js.'\'>Upload to '.$title.'</a> (Drag & drop onto your bookmarks toolbar, then click when looking at an image)';
|
||||||
$link . $delimiter . 'url="+location.href+"&tags="+prompt("enter tags")">' .
|
|
||||||
$title . '</a> (Drag & drop onto your bookmarks toolbar, then click when looking at an image)';
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
/* Danbooru > Shimmie Bookmarklet.
|
/* Danbooru > Shimmie Bookmarklet.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user