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 6473383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:27:35+00:00 2026-05-25T06:27:35+00:00

Quick question regarding Javascript. I’m working on a Safari Extension for paring down the

  • 0

Quick question regarding Javascript. I’m working on a Safari Extension for paring down the Google Search page, and I’d like to change the Google logo to a custom image. My plan is to have an injected .js script to put in the extension.

So far, I’ve tried this:

document.getElementById('img#hplogo').innerHTML = 
"<img alt="Google" height="95" id="hplogo" src="logo3w.png" width="275" 
style="padding-top:136px" onload="window.lol&amp;&amp;lol()">"

For some clarification, the logo image is under the ID on the Google homepage as “hplogo” or according to Safari Web Inspector, “img#hplogo”. I want to replace the src, obviously, with my own logo3w.png that will be located in the root of the extension folder (thus, AFAIK, no advanced directory is needed).

If I could be pointed in the right direction command-wise, that’d be really helpful, but really any and all help is appreciated. Thanks!

  • 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-25T06:27:36+00:00Added an answer on May 25, 2026 at 6:27 am

    You want to do:

    document.getElementById("hplogo").src = "logo3w.png";
    

    Note that the “img#hplogo” is not saying that the id of the img element is “img#hplogo”, it is saying that you are looking at an “img” element whose id is “hplogo”. So when using document.getElementById() you only need to pass “hplogo”. In CSS you might say:

    img #hplogo {
        display: none;  //or whatever
    }
    #hplogo {
        display: none;  //or whatever
    }
    

    And similarly with something like jQuery that supports CSS-style element selectors you might say:

    var image = $("#hpLogo");
    var theSameImage = $("img #hplogo");
    

    But for document.getElementById() all you need to pass (and all you can pass) is “hplogo”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a quick question regarding the proper way to access Javascript class member
Hey all, quick question regarding CSS. On my website , I'd like it if
Quick question regarding settimeout, does it execute periodically like setinterval? Say I have a
Quick question regarding Google Maps, AJAX and some back end data. How would I
Quick question regarding CSS and the browser. I tried searching SO and found some
Quick question regarding memory management in C++ If I do the following operation: pointer
I have a quick question regarding debug and release in VS 2008. I have
I am somewhat new to LINQ and have a quick question regarding deleting. Say,
Good afternoon, I have a quick 'top level' question regarding the usage of Facebook
I had a quick question regarding RegEx... I have a string that looks something

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.