| 91 | | |
|---|
| 92 | | <?php if ( $is_NS4 || $is_gecko || $is_winIE ) { ?> |
|---|
| 93 | | <div id="wp-bookmarklet" class="wrap"> |
|---|
| 94 | | <h3><?php _e('WordPress Bookmarklet'); ?></h3> |
|---|
| 95 | | <p><?php _e('Right click on the following link and choose “Bookmark This Link...” or “Add to Favorites...” to create a posting shortcut.'); ?></p> |
|---|
| 96 | | <p> |
|---|
| 97 | | |
|---|
| 98 | | <?php |
|---|
| 99 | | if ($is_NS4 || $is_gecko) { |
|---|
| 100 | | ?> |
|---|
| 101 | | <a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}location.href='<?php echo get_option('siteurl') ?>/wp-admin/post-new.php?text='+encodeURIComponent(Q)+'&popupurl='+encodeURIComponent(location.href)+'&popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press It - %s'), get_bloginfo('name', 'display')); ?></a> |
|---|
| 102 | | <?php |
|---|
| 103 | | } else if ($is_winIE) { |
|---|
| 104 | | ?> |
|---|
| 105 | | <a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;location.href='<?php echo get_option('siteurl') ?>/wp-admin/post-new.php?text='+encodeURIComponent(Q)+'&popupurl='+encodeURIComponent(location.href)+'&popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press it - %s'), get_bloginfo('name', 'display')); ?></a> |
|---|
| 106 | | <script type="text/javascript"> |
|---|
| 107 | | <!-- |
|---|
| 108 | | function oneclickbookmarklet(blah) { |
|---|
| 109 | | window.open ("profile.php?action=IErightclick", "oneclickbookmarklet", "width=500, height=450, location=0, menubar=0, resizable=0, scrollbars=1, status=1, titlebar=0, toolbar=0, screenX=120, left=120, screenY=120, top=120"); |
|---|
| 110 | | } |
|---|
| 111 | | // --> |
|---|
| 112 | | </script> |
|---|
| 113 | | <br /> |
|---|
| 114 | | <br /> |
|---|
| 115 | | <?php _e('One-click bookmarklet:') ?><br /> |
|---|
| 116 | | <a href="javascript:oneclickbookmarklet(0);"><?php _e('click here') ?></a> |
|---|
| 117 | | <?php |
|---|
| 118 | | } else if ($is_opera) { |
|---|
| 119 | | ?> |
|---|
| 120 | | <a href="javascript:location.href='<?php echo get_option('siteurl'); ?>/wp-admin/post-new.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_option('blogname')); ?></a> |
|---|
| 121 | | <?php |
|---|
| 122 | | } else if ($is_macIE) { |
|---|
| 123 | | ?> |
|---|
| 124 | | <a href="javascript:Q='';location.href='<?php echo get_option('siteurl'); ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_option('blogname')); ?></a> |
|---|
| 125 | | <?php |
|---|
| 126 | | } |
|---|
| 127 | | ?> |
|---|
| 128 | | </p> |
|---|
| 129 | | </div> |
|---|
| 130 | | <?php } ?> |
|---|
| 131 | | |
|---|
| 132 | | <?php include('admin-footer.php'); ?> |
|---|