Upload to '.$title.' (Drag & drop onto your bookmarks toolbar, then click when looking at an image)';
}
{
/* Imageboard > Shimmie Bookmarklet
This is more or less, an upgraded version of the "Danbooru>Shimmie" bookmarklet.
At the moment this works with Shimmie/Danbooru/Gelbooru/oreno.imouto.
The bookmarklet is now also loaded via the .js file in this folder.
*/
//Bookmarklet checks if shimmie supports ext. If not, won't upload to site/shows alert saying not supported.
$supported_ext = "jpg jpeg gif png";
if(file_exists("ext/handle_flash")){$supported_ext .= " swf";}
if(file_exists("ext/handle_ico")){$supported_ext .= " ico ani cur";}
if(file_exists("ext/handle_mp3")){$supported_ext .= " mp3";}
if(file_exists("ext/handle_svg")){$supported_ext .= " svg";}
$title = "Booru to " . $config->get_string('title');
//CA=0: Ask to use current or new tags | CA=1: Always use current tags | CA=2: Always use new tags
$html .= '
'.
$title . ' (Click when looking at an image page. Works on sites running Shimmie/Danbooru/Gelbooru/oreno.imouto. (This also grabs the tags/rating/source!))';
}
}
$page->set_title("Upload");
$page->set_heading("Upload");
$page->add_block(new NavBlock());
$page->add_block(new Block("Upload", $html, "main", 20));
}
/* only allows 1 file to be uploaded - for replacing another image file */
public function display_replace_page(Page $page, $image_id) {
global $config, $page;
$page->add_html_header("");
$tl_enabled = ($config->get_string("transload_engine", "none") != "none");
$js2 = 'javascript:$(function() {
$("#data").hide();
$("#data").val("");
$("#url").show(); });';
$js1 = 'javascript:$(function() {
$("#url").hide();
$("#url").val("");
$("#data").show(); });';
$upload_list = '';
$upload_list .= "