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

This is a discussion on Get HTML code from external web within the Plugins Development section, part of the Chrome Plugins category: I want to create an extension that is able to find a list of words every time click on the ...


  1. #1
    larios_tnt is offline Junior Member
    Join Date
    Apr 2011
    Posts
    2

    Default Get HTML code from external web

    I want to create an extension that is able to find a list of words every time click on the button.

    I want to do something like this

    To do this I must do the following things:
    1. Get the URL of the current page
    2. Save an HTML variable
    3. Find the words in variable

    The problem is that I can not get the current url

    I read the following links

    manifest.json
    Code:
    {
    	"name": "PFC",
    	"version": "1.0",
    	"description": "Search words in web",
    	"browser_action": {
    		"default_title": "Search",
    		"default_icon": "icon.png",
    		"popup": "tabs.html"
    	},
    	"permissions": ["tabs", "http://*/*", "https://*/*"]
    }

    tabs.html
    Code:
    <html>
    	<head>
    		<title>Tabs</title>
    		<style  type = "text/css"> @import 'style.css';			</style>
    	</head>
    
    	<body>
    		<script>
    			What should I write?
    		</script>
    	</body>
    </html>
    Last edited by larios_tnt; 04-03-2011 at 05:06 PM.

  2. #2
    larios_tnt is offline Junior Member
    Join Date
    Apr 2011
    Posts
    2

    Default

    I'll answer the first problem:

    Get the URL of the current page
    Code:
    chrome.tabs.getSelected(null,function(tab)  {
       window.alert("URL = " + tab.url);
    })

    Now im working in the second

Similar Threads

  1. Getting an external page to update a named iFrame window
    By WebsCo in forum Chrome Troubleshooting
    Replies: 0
    Last Post: 11-07-2010, 03:42 PM
  2. Fetch external JS and use it
    By ImHereNotThere in forum Plugins Development
    Replies: 0
    Last Post: 10-11-2010, 03:22 AM
  3. how to start external applications?
    By floral in forum Chrome Plugins
    Replies: 3
    Last Post: 05-24-2010, 04:12 PM
  4. Using Chrome to start an external application
    By ericm76903 in forum Chrome Talk
    Replies: 3
    Last Post: 10-14-2009, 01:28 PM
  5. Why does this JS code bother Chrome so?
    By clcrhiggaeeermo in forum Chrome Tech
    Replies: 3
    Last Post: 02-11-2009, 05:10 AM

Posting Permissions

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