jquga / javarefactoring

Automatically exported from code.google.com/p/javarefactoring
0 stars 0 forks source link

Add quick navigaton panel. #24

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1. When a part of a text is selected, a user may do the follwoing actions
over the selected text:

a. Add the word to my voc
b. View wordnet def
c. Translate to native

Test code: 

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <script type="text/javascript">

    google.load("language", "1");

    function tr(text) {   
   var text = text;

      google.language.translate(text, "en", "es", function(result) {
        if (!result.error) {
          alert(result.translation);
        }
      });
    }

   function getSelText() {

        var txt = '';
         if (window.getSelection)
        {
            txt = window.getSelection();
                 }
        else if (document.getSelection)
        {
            txt = document.getSelection();
                }
        else if (document.selection)
        {
            txt = document.selection.createRange().text;
                }
        else return;

        return txt;
    }

    </script>
<form>    
<input type="button" value="Get selection" onmousedown="tr(getSelText())">
</form> 
<div id="text">Hello</div>

Original issue reported on code.google.com by kalashni...@gmail.com on 23 Jul 2009 at 8:25

GoogleCodeExporter commented 9 years ago

Original comment by kalashni...@gmail.com on 24 Aug 2009 at 4:29

GoogleCodeExporter commented 9 years ago

Original comment by kalashni...@gmail.com on 7 Apr 2011 at 8:52

GoogleCodeExporter commented 9 years ago
These bugs belong to the version 1 Myenvoc

Original comment by kalashni...@gmail.com on 7 Apr 2011 at 8:55