Compiling In Manifest.json/Using History API from Chrome

I am trying to do a thing where I delete a url from the history in an app that will only run in chrome.

To do this, I found that the API for chrome will allow a deleteUrl() function from the history API.

According to: History API Reference, I needed to create a manifest.json, so I did the following:


   "name": "Browser History",
   "version": "1.0",
   "description": "Shows up the history",
   "permissions": [
   "browser_action": {
      "default_popup": "Urls.html",
      "default_icon": "history.jpg"

However, I don’t see where I can add this to the compile to get it compiled in for the project to see it, so that when I call browser.history.deleteUrl(currUrl), it will return the right value?

Has anyone done this?

are you creating a Chrome extension?

No, I’m basically just trying to access the history API from the javascript within my regular app.

So I’m flying kind of blind here, and trying to follow the API instructions. It looks like I need to allow permission to access the history by doing that?

Am I missing something?

In that case, this is probably what you are looking for History.replaceState() - Web APIs | MDN.

I have gone back to pushState(), because the client has decided that it doesn’t matter if the back button works or not since the current app has no working back button.


ok because the api you’ve shown is actually only available from within Chrome extensions

oh! that makes more sense now. Thanks for telling me that.