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:
alex_t_king 2004-01-08 03:30:23 +00:00
parent 824fb50f60
commit f58955f596
2 changed files with 6 additions and 1 deletions

View File

@ -52,6 +52,11 @@ window.close()
} else { } else {
$post_title = $popuptitle; $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']; $content = $_REQUEST['content'];
if (!empty($content)) { if (!empty($content)) {

View File

@ -686,7 +686,7 @@ $bookmarklet_height= ($use_trackback) ? 460 : 420;
if ($is_NS4 || $is_gecko) { 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 echo $blogname ?></a>
<?php <?php
} else if ($is_winIE) { } else if ($is_winIE) {