# Converting Bookmarklet to Chrome Extension

DevFeed: [Converting Bookmarklet to Chrome Extension](<https://devfeed.tech/articles/converting-bookmarklet-to-chrome-extension-41086.md>)

Original publisher: [Read original article](<https://www.craigkerstiens.com/2011/02/02/Converting-Bookmarklet-to-Chrome-Extension/>)

Author: Map

Published: 2011-02-02T08:34:49Z

Content type: tutorial

Language: en

Sources: [Craig Kerstiens](<https://devfeed.tech/sources/craig-kerstiens.md>)

Topics: [Chrome extension](<https://devfeed.tech/topics/chrome-extension.md>), [Extension](<https://devfeed.tech/topics/extension.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [HTML](<https://devfeed.tech/topics/html.md>), [Google](<https://devfeed.tech/topics/google.md>)

Tags: [chrome](<https://devfeed.tech/tags/chrome.md>), [chrome-extension](<https://devfeed.tech/tags/chrome-extension.md>), [extension](<https://devfeed.tech/tags/extension.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [html](<https://devfeed.tech/tags/html.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [manifest](<https://devfeed.tech/tags/manifest.md>)

## AI overview

A tutorial on converting an existing bookmarklet into a Chrome extension. It highlights the need for a background HTML page with an event listener and provides a sample manifest, event handler, and JavaScript call.

## Source excerpt

Google's documentation is pretty good when it comes to how to create an extension that opens a full page and has large functionality. But if you're more interested in transforming an existing bookmarklet into an extension there's not great quality on it. The steps themselves are really quite simple. The big key that's not heavily documented is creating a background html that creates an event listener. After the jump is a full sample that would then call your javascript to activate the bookmarklet: manifest.json background.html chrome.browserAction.onClicked.addListener(function(tab) { chrome.tabs.sendRequest(tab.id, {fun: "callBM"}) }); </script> bm.js