Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1063145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:44:25+00:00 2026-05-16T18:44:25+00:00

I am trying to attempt my first Google Chrome Extension and have a question.

  • 0

I am trying to attempt my first Google Chrome Extension and have a question. My end goal is to be able to select a button which will perform the following:

  1. Grab the current URL of the selected tab (Ex: http://www.google.com)

  2. Open a new tab using the URL from step 1 and appending a query string to the end (Ex: http://www.google.com?filter=0)

Currently, I was able to figure out how to open a create a new tab which loads a specified URL. What I am unsure of how to detect the URL from the selected tab and load that value in the new tab. Suggestions? Thanks in advance!!

Code below:

[popup.html]

    <html>
<head>

<style>

body {
  min-width:175px;
  overflow-x:hidden;
}

</style>


<script>

 function createTab() {
  chrome.tabs.create({'url': 'http://www.google.com'});
 }

 function show_alert()
 {
 alert("I am an alert box!");
 }

</script>
</head>

<body>

<input type="button" onclick="createTab()" value="Create New Tab" />
<hr/>
<input type="button" onclick="show_alert()" value="Show alert box" />

</body>
</html>

[manifest.json]

{
  "name": "IGX Plugin",
  "version": "1.0",
  "description": "IGX Plugin",

  "browser_action": {
    "default_icon": "favicon.ico",
 "popup": "popup.html"
  },
  "permissions": [
    "tabs"
  ]


}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T18:44:26+00:00Added an answer on May 16, 2026 at 6:44 pm
    chrome.tabs.getSelected(null, function(tab) {
        alert(tab.url);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to run the first skeleton program listed here: https://sites.google.com/site/augmentedrealitytestingsite/download I
Trying this question again because my first attempt was barely coherent :p So I
I'm trying to create a simple threading procedure (granted this is my first attempt
After my last, failed, attempt at asking a question here I'm trying a more
I am trying to create a map dialog which allows the user to select
I'm trying to screenscrape the first result of a Google search using Python and
I'm trying to learn AngularJS. My first attempt to get new data every second
I'm trying to execute other programs within my C program. My first attempt was
This is my first attempt at writing a QT app, and I'm just trying
I'm trying to use the code posted here: http://seanho.posterous.com/monotouch-first-attempt-arkit-c-version however - when i try

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.