Bookmarklet should now grab the rating, aswell as the image page link for source.
This commit is contained in:
parent
cd11e75e40
commit
42b902ecb5
@ -80,13 +80,17 @@ class UploadTheme extends Themelet {
|
|||||||
$title . '</a> (Drag & drop onto your bookmarks toolbar, then click when looking at an image)';
|
$title . '</a> (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');
|
$title = "Danbooru to " . $config->get_string('title');
|
||||||
$html .= '<p><a href="javascript:var img=document.getElementById("highres").href;var ste="' .
|
$html .= '<p><a href="javascript:var img=document.getElementById("highres").href;var ste="' .
|
||||||
$link . $delimiter . 'url=";var tag=document.getElementById("post_old_tags").value;if (confirm("OK = Use Current tags.\nCancel = Use new tags.")==true)' .
|
$link . $delimiter . 'url=";var tag=document.getElementById("post_old_tags").value;var doc=document.documentElement.innerHTML;var rtg=doc.match("<li>Rating: (.*)<\/li>");var srx="http://" + document.location.hostname + document.location.href.match("\/post\/show\/.*\/");' .
|
||||||
'{if(tag.search(/\bflash\b/)==-1){location.href=ste+img+"&tags="+tag;}else{location.href=ste+document.getElementsByName("movie")[0].value' .
|
'if (confirm("OK = Use Current tags.\nCancel = Use new tags.")==true)' .
|
||||||
'+"&tags="+tag;}}else{var p=prompt("Enter Tags","");if(tag.search(/\bflash\b/)==-1){location.href=ste+img+"&tags="+p;}' .
|
'{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' .
|
||||||
'else{location.href=ste+document.getElementsByName("movie")[0].value+"&tags="+p;}}">' .
|
'+"&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;}' .
|
||||||
$title . '</a> (As above, Click on a Danbooru-run image page. (This also grabs the tags!))';
|
'else{location.href=ste+document.getElementsByName("movie")[0].value+"&tags="+p+"&rating="+rtg[1]+"&source="+srx;}}">' .
|
||||||
|
$title . '</a> (As above, Click on a Danbooru-run image page. (This also grabs the tags, rating & source!))';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user