<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: vinaynvd</title>
    <description>The latest articles on DEV Community by vinaynvd (@vinaynvd).</description>
    <link>https://dev.to/vinaynvd</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F203116%2Ff3e40e97-5c50-4135-8083-898520654d2f.jpg</url>
      <title>DEV Community: vinaynvd</title>
      <link>https://dev.to/vinaynvd</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vinaynvd"/>
    <language>en</language>
    <item>
      <title>Realtime Polling web application with Python FastApi WebSockets, PyMongo, HTML &amp; JavaScript</title>
      <dc:creator>vinaynvd</dc:creator>
      <pubDate>Thu, 17 Jun 2021 11:55:59 +0000</pubDate>
      <link>https://dev.to/vinaynvd/6-steps-to-publish-your-chrome-extension-in-chrome-web-store-4o1h</link>
      <guid>https://dev.to/vinaynvd/6-steps-to-publish-your-chrome-extension-in-chrome-web-store-4o1h</guid>
      <description>&lt;p&gt;Want to know, how I build a real time polling web application with these 5 elements&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Python’s FastApi&lt;/li&gt;
&lt;li&gt;Websockets.&lt;/li&gt;
&lt;li&gt;PyMango&lt;/li&gt;
&lt;li&gt;HTML, CSS, JavaScript.&lt;/li&gt;
&lt;li&gt;chart.js (For polling graph, we are going to use).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here's the link of my original &lt;a href="https://medium.com/nerd-for-tech/polling-web-application-with-python-fastapi-websockets-pymongo-html-javascript-832c931eca59"&gt;article&lt;/a&gt;&lt;/p&gt;

</description>
      <category>fastapi</category>
      <category>websockets</category>
      <category>python</category>
      <category>realtime</category>
    </item>
    <item>
      <title>6 Steps to publish your Chrome Extension in chrome web store</title>
      <dc:creator>vinaynvd</dc:creator>
      <pubDate>Sat, 05 Jun 2021 05:56:02 +0000</pubDate>
      <link>https://dev.to/vinaynvd/6-steps-to-publish-your-chrome-extension-in-chrome-web-store-14ah</link>
      <guid>https://dev.to/vinaynvd/6-steps-to-publish-your-chrome-extension-in-chrome-web-store-14ah</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;Heya&lt;/em&gt;&lt;/strong&gt;!!&lt;br&gt;
I’m going to show how to &lt;strong&gt;publish our chrome extension&lt;/strong&gt; to the &lt;strong&gt;chrome webstore.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before that, Please read my part 1 article [&lt;a href="https://vinaynvd72.medium.com/is-it-hard-to-create-a-chrome-extension-using-angular-d9fd6a5740f3" rel="noopener noreferrer"&gt;6 steps to create a Chrome Extension using Angular&lt;/a&gt;] if you haven’t read. Part 1 article covers about creating a chrome extension (&lt;a href="https://chrome.google.com/webstore/detail/browser-notes/goejhefllnefpaocmedbdmfnekhnhien" rel="noopener noreferrer"&gt;browser-notes chrome extension&lt;/a&gt;) &amp;amp; testing it locally.&lt;/p&gt;

&lt;p&gt;Before publishing our extension, I’m going to add a new feature to the chrome extension which we’ve developed in the previous article &amp;amp; then we can publish our extension.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding “Export to HTML” Feature for our browser notes extension.
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AXbSjjp2QKd9KuuOyQLqiOg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AXbSjjp2QKd9KuuOyQLqiOg.png" alt="Browser notes extension with Export to HTML button (feature)"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’m adding the project’s github repo link &lt;a href="https://github.com/vinaynvd/browser-notes-extension" rel="noopener noreferrer"&gt;here&lt;/a&gt;. You can refer &lt;a href="https://github.com/vinaynvd/browser-notes-extension/blob/main/src/app/components/notes-editor/" rel="noopener noreferrer"&gt;notes-editor component&lt;/a&gt; in this project.&lt;/p&gt;

&lt;p&gt;In this component I’ve added **Export to HTML **button.&lt;br&gt;
You can refer to this path in my repo &lt;a href="https://github.com/vinaynvd/browser-notes-extension/tree/main/src/app/components/notes-editor" rel="noopener noreferrer"&gt;browser-notes-extension/src/app/notes-editor&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;When a user clicks Export to HTML button, extension is going to download their copied/typed content in the form of html file. &lt;br&gt;
Also, what ever you type or paste in our extension, It’s going to save in user’s browser local storage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This extension will use your browser’s local storage to store content&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Now let’s go publishing our chrome extension into the chrome web store.&lt;br&gt;
Here are the 6 steps to publish your Chrome extension successfully in to the chrome webstore.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1 : Register for a Google developer account
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;A Developer account&lt;/strong&gt; is a normal google account that is used for &lt;strong&gt;publishing **extensions or apps on **Play Store&lt;/strong&gt; &lt;strong&gt;or Web Store&lt;/strong&gt;. &lt;br&gt;
We need this account to publish our extension in to the chrome webstore. It’s easy to create a developer account, You need to &lt;strong&gt;spend 5$&lt;/strong&gt; as one time signup fee. Then you will be able to &lt;strong&gt;publish&lt;/strong&gt; &lt;strong&gt;up to&lt;/strong&gt; &lt;strong&gt;20&lt;/strong&gt; different &lt;strong&gt;extensions&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2 : Creating New Item
&lt;/h2&gt;

&lt;p&gt;Once you are an owner of Google developers account, you can go to your developer’s dashboard. Here’s how it looks&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3840%2F1%2ASG4RTtdnZ2rMNISKGDan3Q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3840%2F1%2ASG4RTtdnZ2rMNISKGDan3Q.png" alt="Google developer’s dashboard of a user"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To publish our extension, click on new Item. It’s going to ask the zip file of your chrome extension project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AygI8Ols8mV4epxQzRWXMxA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AygI8Ols8mV4epxQzRWXMxA.png" alt="Drop zip file in google developer’s dashboard."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In our Angular application case, we’ve already built our extension in dist directory by running this command &amp;amp; zipped it. You can refer the step 5 of part 1 &lt;a href="https://vinaynvd72.medium.com/is-it-hard-to-create-a-chrome-extension-using-angular-d9fd6a5740f3" rel="noopener noreferrer"&gt;article&lt;/a&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ng build --prod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;After generating the build of our extension, you can go to **dist **directory &amp;amp; zip the browser-notes folder. Drag &amp;amp; drop that zip file in Add new item dialog in developers dashboard.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3 : Store Listing
&lt;/h2&gt;

&lt;p&gt;When you’ve successfully added your zip file in step 2. It’s going to take you to store listing page. By default this page is going to read the values like Title, version..etc from the manifest.json file (which is in your zip file).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3656%2F1%2AfSL5inp9awCIi2pL7K_8Og.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3656%2F1%2AfSL5inp9awCIi2pL7K_8Og.png" alt="Store listing page of chrome extension."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My extension was rejected when my description was too short &amp;amp; it contains excessive &amp;amp; irrelevant keywords. So I got a mail like this&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2ABon534jCkGz22xEM0bD3lw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2ABon534jCkGz22xEM0bD3lw.png" alt="Chrome extension rejection mail"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For successful approval of your extension, please note these points&lt;/strong&gt;, &lt;br&gt;
&lt;strong&gt;1. **Need to write a **long explanatory description&lt;/strong&gt;, which was &lt;strong&gt;approved&lt;/strong&gt; for the very next day.&lt;br&gt;
&lt;strong&gt;2.&lt;/strong&gt; We need to have &lt;strong&gt;store icon&lt;/strong&gt; of &lt;strong&gt;128x128 **pixels.&lt;br&gt;
**3.&lt;/strong&gt; Need to provide &lt;strong&gt;at least 1 screenshot&lt;/strong&gt; whose &lt;strong&gt;size **should be **1280x800&lt;/strong&gt; or &lt;strong&gt;600x400&lt;/strong&gt;. You can provide a maximum of 5 screenshots.&lt;br&gt;
&lt;strong&gt;4.&lt;/strong&gt; Need to provide 1 &lt;strong&gt;small promo tile&lt;/strong&gt; of 440x280 size &amp;amp; &lt;strong&gt;Large promo tile&lt;/strong&gt; of size 920x680 &amp;amp; **Marquee promo tile **of size 1400x560.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Privacy practices
&lt;/h2&gt;

&lt;p&gt;After filling form in your store listing page, you’ll be redirected to **Privacy practices **page. Here you need to provide the following information.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Single purpose&lt;/strong&gt; : An extension must have a single purpose that is narrow and easy-to-understand.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Permission justification&lt;/strong&gt; : Are you using the remote code, if Y*&lt;em&gt;es **then provide the **justification&lt;/em&gt;&lt;em&gt;. In our case N&lt;/em&gt;&lt;em&gt;o.
**3. **Data usage *&lt;/em&gt;: What user data do you plan to collect from users now or in the future ? In our case, we collect only website content like text, images, hyperlinks..etc.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Finally you need to check these disclosures in Privacy practices&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2A7eaNj7kGkhbpIxf9hBfReQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2A7eaNj7kGkhbpIxf9hBfReQ.png" alt="disclosures to comply with our [Developer Program Policies](https://developer.chrome.com/webstore/program_policies)"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5 : Payments &amp;amp; Distribution
&lt;/h2&gt;

&lt;p&gt;Here in this step, you need to setup your payment, if you want to monetize your extension. Right now, I’m publishing this extension for free.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3522%2F1%2AOnJWI1CPb3imDLkmeQ5ACw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3522%2F1%2AOnJWI1CPb3imDLkmeQ5ACw.png" alt="Payments &amp;amp; Distribution page in chrome webstore developers dashboard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can select the visibility of your extension to **Public, Private or Unlisted. **Distribution, Here if you want to make your extension available to **All Regions, **you can do that or you can select the countries listed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3006%2F1%2Aub7IQxhagm-QZ0FYn-fCbA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3006%2F1%2Aub7IQxhagm-QZ0FYn-fCbA.png" alt="Distribution step with countries."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6 : Submit for review
&lt;/h2&gt;

&lt;p&gt;This is the final step to submit your chrome extension for review. Here All apps go through an automated review process and in some cases, an app will be published without further manual review. There may be some instances in which a manual review will be required before the app is published based on chrome extension &lt;a href="https://developer.chrome.com/docs/webstore/program_policies/" rel="noopener noreferrer"&gt;program policies&lt;/a&gt;. In some cases, where sensitive permissions are requested, review times and/or approval times may be longer.&lt;/p&gt;

&lt;p&gt;Before hitting &lt;strong&gt;submit for review **button, I suggest hit **Save draft **button first. &lt;br&gt;
Once your application is submitted &amp;amp; their review is done &amp;amp; approved, you will get an **email **like this from **chrome webstore.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AT13HWrSU7cVnjheyxQ9mOA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AT13HWrSU7cVnjheyxQ9mOA.png" alt="Chrome extension approved mail after review for publishing"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally you can see your extension in chrome webstore, when you hit the **Link to published item.&lt;br&gt;
**Here’s our Browser notes extension published in chrome webstore. &amp;amp; Here’s the &lt;a href="https://chrome.google.com/webstore/detail/browser-notes/goejhefllnefpaocmedbdmfnekhnhien" rel="noopener noreferrer"&gt;Browser notes extension link in chrome web store&lt;/a&gt;. &lt;br&gt;
Yayy!! I already had 5 users &amp;amp; 2 reviews. &lt;br&gt;
Come on!! Don’t feel shy to try our extension too 😉&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2138%2F1%2A2DPh-Oi_r0FgWyID7QS2fQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2138%2F1%2A2DPh-Oi_r0FgWyID7QS2fQ.png" alt="Browser notes extension page in chrome webstore"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Here in this article, we’ve seen how to publish our extension successfully in chrome webstore. Building &amp;amp; publishing chrome extension is easy, Use your creativity &amp;amp; publish your own extension in the web store. &lt;br&gt;
Hope, this article helped you to begin your journey to successfully publish your extension.&lt;/p&gt;

&lt;p&gt;Want to thank me ? Please show your Support &amp;amp; Love by buying me a coffee ☕ by hitting the below link 😃&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/vinaynvd" rel="noopener noreferrer"&gt;https://www.buymeacoffee.com/vinaynvd&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks Alot!! 🙂&lt;/p&gt;

</description>
      <category>chromewebstore</category>
      <category>chromeextension</category>
      <category>publishextension</category>
      <category>publishchromewebstoreextension</category>
    </item>
    <item>
      <title>6 steps to create a Chrome Extension using Angular</title>
      <dc:creator>vinaynvd</dc:creator>
      <pubDate>Fri, 04 Jun 2021 07:41:20 +0000</pubDate>
      <link>https://dev.to/vinaynvd/6-steps-to-create-a-chrome-extension-using-angular-45j8</link>
      <guid>https://dev.to/vinaynvd/6-steps-to-create-a-chrome-extension-using-angular-45j8</guid>
      <description>&lt;p&gt;We all use chrome extension, don’t we ? We use them everyday in our browsers like Adblock, Dark reader, LastPass, FoxClocks…etc.&lt;/p&gt;

&lt;p&gt;What do these chrome extension dooo…. ?&lt;br&gt;
They add extra features to your chrome browser. You can customize &amp;amp; personalize on your desktop browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s create a chrome extension
&lt;/h2&gt;

&lt;p&gt;I’m a beginner in angular, but I’ve created a &lt;a href="https://chrome.google.com/webstore/detail/browser-notes/goejhefllnefpaocmedbdmfnekhnhien" rel="noopener noreferrer"&gt;**Browser Notes chrome extension&lt;/a&gt; . **You can make use of this extension for free.&lt;/p&gt;

&lt;p&gt;Let’s create a chrome extension, which can be used for write or pasting notes. With this extension, you can copy the contents for making notes &amp;amp; export it as html file.&lt;/p&gt;

&lt;p&gt;In my next blog, I’ll be sharing how to publish our extension in chrome web store.&lt;/p&gt;

&lt;p&gt;Now in this blog, let’s bother about creating an extension. Follow these steps :&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1 : Setup Angular Project in your local
&lt;/h3&gt;

&lt;p&gt;Before creating an angular project, make sure you have &lt;strong&gt;npm&lt;/strong&gt; installed already.&lt;br&gt;
Then you can start installing angular/cli, If you don’t have in your local.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g @angular/cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;**Create a new workspace&lt;br&gt;
**After installing angular/cli, we need to create a workspace for our project. Run this command.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ng new browser-notes-extension
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;I’m creating a new project by name **browser-notes-extension **in my local. It’s going to take few minutes to setup. After creation of new workspace, run these 2 commands.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd browser-notes-extension
npm install --save bootstrap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;First command is to go to your project directory &amp;amp; second one is for installing bootstrap. &lt;br&gt;
Now Open angular.json file &amp;amp; bootstrap min css &amp;amp; js files in styles &amp;amp; scripts under build.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"architect": {
  "build": {
    [...], 
    "styles": [
      "src/styles.css", 
      "node_modules/bootstrap/dist/css/bootstrap.min.css"
      ],
      "scripts": [
        "node_modules/bootstrap/dist/js/bootstrap.min.js"
      ]
    },
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Cool! We have our angular project setup in our local. We can run it with this command.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ng serve --open
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;It’s going to run your project in your default browser on port 4200. This’ll be the link &lt;a href="http://localhost:4200" rel="noopener noreferrer"&gt;http://localhost:4200&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 : Write chrome extension code.
&lt;/h3&gt;

&lt;h3&gt;
  
  
  We’ll start with text editor
&lt;/h3&gt;

&lt;p&gt;For our browser-notes-extension, we need text editor. So that we can type our notes or we can copy important notes from other sites.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Writing a text editor from scratch is &lt;strong&gt;Pain in the A (&lt;/strong&gt;&lt;em&gt;Please don’t ask what is A 😉&lt;/em&gt;). So instead of writing the text editor, I’m using already available ones &lt;a href="https://yabwe.github.io/medium-editor/" rel="noopener noreferrer"&gt;**Medium-editor&lt;/a&gt;**.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Medium-editor is a simple inline editor with toolbar &amp;amp; &lt;strong&gt;this is not affiliated with &lt;a href="https://medium.com" rel="noopener noreferrer"&gt;medium.com&lt;/a&gt;&lt;/strong&gt;. This editor serves our purpose &amp;amp; it is available as npm package too.&lt;/p&gt;

&lt;p&gt;Install medium editor with this command&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install medium-editor --save
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now in your angular project, medium-editor is installed. We need to integrate medium-editor with our script. So open your angular.json file &amp;amp; add this line in scripts array.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"scripts": [
              "node_modules/medium-editor/dist/js/medium-editor.min.js"
            ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Step 3: Integrating text editor
&lt;/h3&gt;

&lt;p&gt;Before directly adding text editor, we also need to import css in to our application. So open styles.scss/styles.css file and these lines in top.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@import '~medium-editor/dist/css/medium-editor.min.css';
@import '~medium-editor/dist/css/themes/default.min.css';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;They are going to import medium-editor styles in to your application. &lt;br&gt;
Now final touch, replace all the static html code from app.component.html file with this one&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div #medium-editor&amp;gt;&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Yupp!!! We’ve integrated text editor successfully. But it won’t work 😅.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: To Make it work
&lt;/h3&gt;

&lt;p&gt;To make our text editor work, we need to add few properties in our app.component.ts file.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Component, AfterViewInit, ViewChild, ElementRef } from '[@angular/core](http://twitter.com/angular/core)';

declare const MediumEditor: any;[@Component](http://twitter.com/Component)({
  selector: 'app-editor',
  templateUrl: './editor.component.html'
});

export class AppComponent implements AfterViewInit {
  editor: any;
  title = 'browser-notes-extension';
  [@ViewChild](http://twitter.com/ViewChild)('medium-editor', { static: true }) medium-editor:ElementRef;
  editorConfig = {
                 imageDragging: true,
                 toolbar: false,
                 anchorPreview: true,
                 autoLink: true,      
                 paste: {
                         forcePlainText: false,
                         cleanPastedHTML: false,
                         cleanAttrs: ['style', 'dir'],
                         cleanTags: ['label', 'meta']
                 },
                 buttonLabels: false,
                 keyboardCommands: false,
                 placeholder: {
                               hideOnClick: true
                              },
                 spellcheck: true,
                 updateOnEmptySelection: true
                }

  constructor() { }

  ngAfterViewInit(): void {
   // Initializing the editor object after view init.
   this.editor = new MediumEditor(this.medium-editor.nativeElement, this.editorConfig);
  }

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Here in the above code, we’ve added our editorConfig. They can be modified according to your needs, you can find more options to modify your text editor from here &lt;a href="https://github.com/yabwe/medium-editor" rel="noopener noreferrer"&gt;yabwe/medium-editor&lt;/a&gt; .&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Converting our application to chrome extension
&lt;/h3&gt;

&lt;p&gt;We have fully working text editor application. We just need to convert it to chrome extension. Here’s how we do it.&lt;/p&gt;

&lt;p&gt;First we need to define the size of our chrome extension popup. &lt;strong&gt;Chrome extension popups&lt;/strong&gt; can have a maximum &lt;strong&gt;height&lt;/strong&gt; of 600px and maximum &lt;strong&gt;width&lt;/strong&gt; of 800px. Changing the &lt;strong&gt;width&lt;/strong&gt; or &lt;strong&gt;height&lt;/strong&gt; using CSS on the html or &lt;strong&gt;body&lt;/strong&gt; element will just cause scroll bars.&lt;/p&gt;

&lt;p&gt;Open styles.css/styles.scss file and these lines&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;html { 
     position: relative; 
     min-height: 
} 
body { 
     margin: 0; 
     font-family: Roboto, “Helvetica Neue”, sans-serif; 
     width: 400px; 
     height:430px !important; 
     overflow-y: scroll; 
     overflow-x: scroll;
} 

/* Hide scrollbar for Chrome, Safari and Opera */
#medium-editor::-webkit-scrollbar { display: none;}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;Next add manifest.json file in src folder. Here’s the directory structure &lt;br&gt;
&lt;strong&gt;browser-notes-extension/src/manifest.json&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This manifest.json file is going to define the chrome extension. Add these lines in manifest.json&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{    
    "name": "Browser Notes",
    "version": "2.0",
    "description": "You can take notes, which includes text, lists, links &amp;amp; images. We can export our notes in the form of html..",
    "manifest_version": 2,
    "browser_action": {
        "default_icon": {
            "19": "assets/path-to-your-icon-image (it should be in png form)",
            "38": "assets/path-to-your-icon-image (it should be in png form)"
        },
        "default_popup": "index.html"
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Finally!! We did it.&lt;/p&gt;

&lt;p&gt;Now let’s build our project by running this command.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ng build --prod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This command is going to build our project in &lt;strong&gt;dist&lt;/strong&gt; directory. Directory structure : &lt;strong&gt;&lt;em&gt;browser-notes-extension/dist/browser-notes-extension&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Zip &lt;em&gt;**browser-notes-extension *&lt;/em&gt;*folder in dist directory. So that we can use it for testing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6 : Test it
&lt;/h3&gt;

&lt;p&gt;To check if our application can be run as chrome extension or not, we first need to enable developers mode in our chrome browser. You can check it &lt;a href="https://developer.chrome.com/docs/extensions/mv3/faq/#:~:text=You%20can%20start%20by%20turning,right%2Dhand%20corner%20is%20checked." rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Next in application’s terminal/cmd run this&lt;/p&gt;

&lt;p&gt;Now in url bar type&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chrome://extensions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;It’s going to launch extensions page. Now you can see &lt;strong&gt;load unpacked&lt;/strong&gt; option as shown in the below image &amp;amp; check the Developer mode in the top right too.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3840%2F1%2AnG2VFY8_bE9Bj03AGnrUWQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3840%2F1%2AnG2VFY8_bE9Bj03AGnrUWQ.png" alt="Load unpacked for chrome extensions &amp;amp; developer mode."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now click on load unpacked button &amp;amp; select your zipped project from dist directory. If there are no errors in our application, it’ll be active directly. Otherwise, it’s going to throw up some error message &amp;amp; you can resolve it &amp;amp; rebuild &amp;amp; re-upload it.&lt;/p&gt;

&lt;p&gt;Now you can check your extension in your extensions page (chrome://extensions)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AYwupydRfmM0t8_zQkqnN9A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AYwupydRfmM0t8_zQkqnN9A.png" alt="Browser Notes extension in chrome extensions page"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, you know how to pin your extension &amp;amp; use it. This is the end output&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AQwnvOBEK0r6wPyO5yE6F2A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AQwnvOBEK0r6wPyO5yE6F2A.png" alt="Browser-notes extension popup"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see the demo of working browser-notes extension &lt;a href="https://chrome.google.com/webstore/detail/browser-notes/goejhefllnefpaocmedbdmfnekhnhien" rel="noopener noreferrer"&gt;here&lt;/a&gt; .&lt;/p&gt;

&lt;p&gt;In my next article&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I’ve done abit styling and code to “&lt;strong&gt;Export to html&lt;/strong&gt;” functionality.&lt;/li&gt;
&lt;li&gt;How to publish our chrome extension &amp;amp; make it public. Here’s the &lt;a href="https://vinaynvd72.medium.com/6-steps-to-publish-your-chrome-extension-in-chrome-web-store-5825968aad49" rel="noopener noreferrer"&gt;link&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Building an extension doesn’t require much work. You just need a manifest.json, right css, images &amp;amp; proper functionality of your code.&lt;/p&gt;

&lt;p&gt;If you want your application to manage events with background scripts, you can add background.js script file in your manifest.json as shown &lt;a href="https://developer.chrome.com/docs/extensions/mv2/background_pages/" rel="noopener noreferrer"&gt;here &lt;/a&gt;&amp;amp; write your background.js’s scripts in it.&lt;/p&gt;

&lt;p&gt;Use this link &lt;a href="https://developer.chrome.com/docs/extensions/mv2/background_pages/" rel="noopener noreferrer"&gt;for managing events with background scripts&lt;/a&gt; for reference. Here’s the chrome extension documentation &lt;a href="https://developer.chrome.com/docs/extensions/reference/" rel="noopener noreferrer"&gt;link&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Want to thank me ? Please show your love by buying me a coffee ☕ by hitting the below link 😃&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/vinaynvd" rel="noopener noreferrer"&gt;https://www.buymeacoffee.com/vinaynvd&lt;/a&gt;&lt;br&gt;
Thank You 🙏&lt;/p&gt;

</description>
      <category>chromeextension</category>
      <category>extension</category>
      <category>webstore</category>
      <category>chromewebstore</category>
    </item>
  </channel>
</rss>
