Updated the bookmarklet to give you an option to use either the your own or the current tags.

This commit is contained in:
Daku 2011-12-14 07:36:01 +00:00
parent 0e4f93a42f
commit 2b717063eb

View file

@ -71,12 +71,13 @@ class UploadTheme extends Themelet {
if($tl_enabled) {
$link = make_http(make_link("upload"));
$title = "Danbooru to " . $config->get_string('title');
$html .= '<p><a href="javascript:if(document.getElementById(&quot;post_old_tags&quot;).value.search(/\bflash\b/)==-1) { location.href=&quot;' .
$link . '?url=&quot;+document.getElementById(&quot;highres&quot;).href+&quot;&amp;tags=&quot;+document.getElementById(&quot;post_old_tags&quot;).value } else { location.href=&quot;' .
$link . '?url=&quot;+document.getElementsByName(&quot;movie&quot;)[0].value+&quot;&tags=&quot;+document.getElementById(&quot;post_old_tags&quot;).value } ">' .
$html .= '<p><a href="javascript:var img=document.getElementById(&quot;highres&quot;).href;var ste=&quot;' .
$link . '?url=&quot;;var tag=document.getElementById(&quot;post_old_tags&quot;).value;if (confirm(&quot;OK = Use Current tags.\nCancel = Use new tags.&quot;)==true)' .
'{if(tag.search(/\bflash\b/)==-1){location.href=ste+img+&quot;&amp;tags=&quot;+tag;}else{location.href=ste+document.getElementsByName(&quot;movie&quot;)[0].value' .
'+&quot;&amp;tags=&quot;+tag;}}else{var p=prompt(&quot;Enter Tags&quot;,&quot;&quot;);if(tag.search(/\bflash\b/)==-1){location.href=ste+img+&quot;&amp;tags=&quot;+p;}' .
'else{location.href=ste+document.getElementsByName(&quot;movie&quot;)[0].value+&quot;&amp;tags=&quot;+p;}}">' .
$title . '</a> (As above, Click on a Danbooru-run image page. (This also grabs the tags!))';
}
$page->set_title("Upload");
$page->set_heading("Upload");
$page->add_block(new NavBlock());