made the bookmarklet safari compatible and enabled passing in the title, task #49
git-svn-id: http://svn.automattic.com/wordpress/trunk@738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
824fb50f60
commit
f58955f596
|
@ -52,6 +52,11 @@ window.close()
|
|||
} else {
|
||||
$post_title = $popuptitle;
|
||||
}
|
||||
// I'm not sure why we're using $edited_post_title in the edit-form.php, but we are
|
||||
// and that is what is being included below. For this reason, I am just duplicating
|
||||
// the var instead of changing the assignment on the lines above.
|
||||
// -- Alex King 2004-01-07
|
||||
$edited_post_title = $post_title;
|
||||
|
||||
$content = $_REQUEST['content'];
|
||||
if (!empty($content)) {
|
||||
|
|
|
@ -686,7 +686,7 @@ $bookmarklet_height= ($use_trackback) ? 460 : 420;
|
|||
|
||||
if ($is_NS4 || $is_gecko) {
|
||||
?>
|
||||
<a href="javascript:Q=document.selection?document.selection.createRange().text:document.getSelection();void(window.open('<?php echo $siteurl ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'<?php echo $bookmarklet_tbpb ?>&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'WordPress bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));">Press It
|
||||
<a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}void(window.open('<?php echo $siteurl ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'WordPress bookmarklet','scrollbars=yes,width=600,height=460,left=100,top=150,status=yes'));">Press It
|
||||
- <?php echo $blogname ?></a>
|
||||
<?php
|
||||
} else if ($is_winIE) {
|
||||
|
|
Loading…
Reference in New Issue