diff --git a/ext/upload/theme.php b/ext/upload/theme.php index a18adbe5..7ce049cf 100644 --- a/ext/upload/theme.php +++ b/ext/upload/theme.php @@ -80,13 +80,17 @@ class UploadTheme extends Themelet { $title . ' (Drag & drop onto your bookmarks toolbar, then click when looking at an image)'; } { + /* Danbooru > Shimmie Bookmarklet. + This "should" work on any site running danbooru, unless for some odd reason they switched around the id's or aren't using post/list. + */ $title = "Danbooru to " . $config->get_string('title'); $html .= '

' . - $title . ' (As above, Click on a Danbooru-run image page. (This also grabs the tags!))'; + $link . $delimiter . 'url=";var tag=document.getElementById("post_old_tags").value;var doc=document.documentElement.innerHTML;var rtg=doc.match("

  • Rating: (.*)<\/li>");var srx="http://" + document.location.hostname + document.location.href.match("\/post\/show\/.*\/");' . + 'if (confirm("OK = Use Current tags.\nCancel = Use new tags.")==true)' . + '{if(tag.search(/\bflash\b/)==-1){location.href=ste+img+"&tags="+tag+"&rating="+rtg[1]+"&source="+srx;}else{location.href=ste+document.getElementsByName("movie")[0].value' . + '+"&tags="+tag+"&rating="+rtg[1]+"&source="+srx;}}else{var p=prompt("Enter Tags","");if(tag.search(/\bflash\b/)==-1){location.href=ste+img+"&tags="+p+"&rating="+rtg[1]+"&source="+srx;}' . + 'else{location.href=ste+document.getElementsByName("movie")[0].value+"&tags="+p+"&rating="+rtg[1]+"&source="+srx;}}">' . + $title . ' (As above, Click on a Danbooru-run image page. (This also grabs the tags, rating & source!))'; }