CBeTJlu4ok
CBeTJlu4ok

Reputation: 1112

Google Chrome - Extension vs App

I want to modify chrome start page, change background and maybe logo.

I want to include jQuery in users local storage and load it while users page loads ( search page )

I never done anything with chrome so I want some way where to start. Do I go reading with apps or extensions?

Upvotes: 2

Views: 925

Answers (1)

Rob W
Rob W

Reputation: 348962

As a rule of thumb: Choose an app if you want to develop an (independent) application that can stand on its own. If you want to interact with the browser (e.g. modify a web page), build an extension.

In your case, you definitely need an extension.

  • Change start page - use chrome_url_overrides in the manifest file to override newtab.
  • Locally store jQuery: Although it's possible to store jQuery in local storage, you're probably fine with packaging jQuery with your extension.
    To add it to your user's "search page", you have to use a content script. By default, content scripts run in an execution environment that is different from the page (the document's DOM is shared though). Usually, this behavior is desired. If you really want to expose the jQuery library to the scripts in the page, take a look at this answer.
    If you really want to load some script from a remote location and use it as a content script, read Chrome extension adding external javascript to current page's html.

I'm not sure what you mean by "change background and maybe logo". If you're referring to the browser's appearance, the only option to do that is by creating a theme. This must be a separate extension.

Upvotes: 4

Related Questions