Welcome guest, is this your first visit? Create Account now to join.
Results 1 to 3 of 3

This is a discussion on Chrome plugin for right clicking text within the Chrome Plugins section, part of the Google Chrome category: Hi.. I am interested in making a plugin but not sure if it can be done. I view alot of ...


  1. #1
    acidrain0 is offline Junior Member
    Join Date
    Aug 2010
    Posts
    1

    Default Chrome plugin for right clicking text

    Hi.. I am interested in making a plugin but not sure if it can be done. I view alot of pages in my company and would like to highlight a piece of text and right cilck it and one of the options would be to send the text to a url and open it in another tab. Like double click the word "downloads" (to highlight) and right click, and have it open http://website.com/downloads, is this possible?

  2. #2
    sarjoor is offline Senior Member
    Join Date
    Sep 2009
    Posts
    147

    Default

    This should be possible with the Context Menus extensions API available starting in Chrome 6:

    http://code.google.com/chrome/extens...textMenus.html

  3. #3
    PAEz's Avatar
    PAEz is offline Moderator
    Join Date
    Aug 2009
    Location
    Australia
    Posts
    656

    Default

    Its totally possible and nice and simple...

    manifest.json
    Code:
    {
      "name": "GotoText",
      "description": "You know what it does.",
      "version": "1.0",
      "minimum_chrome_version": "6.0.4",
      "permissions": ["contextMenus","tabs","http://*/","https://*/"],
      "background_page": "background.html",
      "icons": { "16": "16.png",
               "48": "48.png",
              "128": "128.png" }
    }
    background.html
    Code:
    <script>
    function GotoSelected(info, tab) {
    var prefix='http://www.google.com.au/search?q=';
    chrome.tabs.create({"url":prefix+info.selectionText , "selected":true});
    };
    
    var id = chrome.contextMenus.create({"title": "Goto...", "contexts":["selection"],"onclick": GotoSelected});
    </script>

Similar Threads

  1. Edit text with your favorite text editor in Chrome!
    By Channing1 in forum Chrome Tips & Tricks
    Replies: 9
    Last Post: 08-02-2012, 04:21 AM
  2. Text to Speech for Google Chrome
    By mgladding in forum Chrome Plugins
    Replies: 5
    Last Post: 10-21-2011, 08:05 AM
  3. Chrome trying to download file when clicking link
    By gary1511 in forum Chrome Troubleshooting
    Replies: 5
    Last Post: 03-19-2011, 06:33 AM
  4. Text dragging?
    By Bob7k in forum Chrome Tips & Tricks
    Replies: 5
    Last Post: 03-08-2010, 07:34 AM
  5. Please Convert Scribefire Firefox Plugin into Chrome Plugin
    By solik in forum Plugins Development
    Replies: 7
    Last Post: 02-26-2010, 02:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •