Wednesday, 27 December 2017

How to Build a Chrome Extension

Google Chrome is the most popular browser on the planet. You use it, your mom uses it, your cat uses it. Sure, it’s got quirks and problems. But if you want to reach a large audience, designing a Google Chrome extension isn’t a bad way to do it. Fortunately, it’s pretty easy to build a Chrome extension.

Chrome extensions are basically web pages. Primarily, they’re Javascript, with some HTML and CSS thrown in and a teaspoonful of JSON. We’ll go through the basic steps to build a Chrome extension, but you can extend this knowledge to just about any of the many powerful functions Google offers. We’ll review the bones that build an extension, and you can flesh it out from there. If you want to check out the documentation to build a Chrome extension, you can find it at Chrome’s Developer Extension Guide.

Build a Chrome Extension: Hello World

A Chrome extension is made of up a couple of files. For our extension, you’ll need a JSON file to tell the extension what to do (manifest.json), an HTML file that shows what the extension loads (popup.html), and an icon to represent the extension in the toolbar (icon.png).

manifest.json is the heart of any Chrome extension. It tells the extension what resources to load and what kinds of actions it can take. Our simple manifest.json looks like so:

{
    "manifest_version": 2,

    "name": "Hello World!", 
    "version": "0.1",
    "description": "My first Chrome extension.",
    "browser_action": {
        "default_icon": "icon.png",
        "default_popup": "popup.html"
    },
    "permissions": [
        "activeTab"
     ]
}

Some fields are fairly self-descriptive. Let’s review the others:

  • manifest_version is required by Google’s extension framework. It must be set to 2 to indicate the current manifest framework.
  • browser action identifies the type of extension you’re building. A browser action extension places a clickable icon in Chrome’s menu bar, allowing the user to interact with your extension and run its contents.
  • default_icon shows the path to the icon. It starts from the extensions directory.
  • default_popup shows the path to the file that will run when the extension is clicked. It will be shown beneath the extension in a popup box.
  • permissions tells the extension where it’s allowed to operate. activeTab is the most common, allowing the extension to access information about the front-most tab.

For our extension, we’ll need to drop that manifest into a folder alongside a file named andicon.png an HTML file named popup.html. If your extension’s HTML file calls any scripts, you’ll need to include a script file in your extension’s directory. Google’s security rules won’t allow you to embed Javascript (or any other script) in the HTML file itself.

Doing the Bare Minimum

We’ll focus on making the most basic possible extension here. Once you’ve got a handle on the basic structure of a Chrome extension, you can use your web developer chops to code up something awesome.

We’ll use the following for our popup.html file:

<!doctype html>
<html>
    <head>
         <title>Hello World</title>
    </head>
    <style type="text/css">
        body {
            margin: 10px;
        }
        h1 {
            font-size: 15px;
            text-align: center;
        }
    </style>
    <body>
        <h1>Hello World!</h1>
    </body>
</html>

All this does is say hello to the user, nothing more. If you want to do anything more complicated involving user interaction, you’ll need to get your Javascript out. Thanks to Google’s extension security rules, if you want to load some Javascript alongside your HTML, you’ll need to present that in a separate file. You can load it in head with the script src tag.

Load Your Extension

Once you’ve finished writing your extension, you can load it into Chrome.

Navigate to chrome://extensions and turn on Developer Mode by ticking the checkbox in the upper right.

Then click the “Load unpacked extension…” button and select the extension’s directory. Chrome will run a basic debug on your manifest.json file to make sure it’s up to snuff. If you make a syntax error or leave out important information, you’ll need to fix it before you can successfully load the extension.

Once the extension is loaded, you’ll see its icon in the menu bar. Now we’re getting places!

Click on the extension to see its (admittedly meager) effect.

As you debug and develop your extension, you can click the “Reload” link below the extension (or press Command-R on Mac and Control-R on Windows) to update its files.

Publish Your Extension to the Chrome Store

Once you’ve finished your extension, you’ll need to upload the finished version to the Chrome store. You’ll need to zip all your files together and then process it through your Chrome developer account. Unfortunately, that can be a little complicated. Google has quite a bit of security on their end. Check out the full instructions for publishing your Google extension here.

Conclusion

Remeber, this is only a very basic guide to creating a Chrome extension. As the Chrome Store shows, you can get far more creative with your content. Once you’ve digested all of this, learn more about Chrome extensions at Google’s Chrome’s Developer Extension Guide.

You might be interested in the following posts as well:

10 Chrome Addons Every Dev Should Have

Useful Chrome Extensions For Designers and Creatives

Web Design Tools for Beginners 2017

The post How to Build a Chrome Extension appeared first on SpyreStudios.



from SpyreStudios http://spyrestudios.com/build-chrome-extension/

Sunday, 24 December 2017

20 Cool Infographic Templates to Create Amazing Designs

In the era of internet, the process of learning becomes much more comfortable as it was before. Most people are visuals learners so visual content like infographics, slideshares, and videos are usually great marketing tools. Today I want to focus more on infographics and I want to give you some awesome examples of infographics that you can create.

First things first, let’s see what an infographic is.
An infographic is a presentation of data using different images, charts, graphs, and maps to make this information easy to understand and remember. A lot of companies use infographics as a marketing tool to promote their new products, tell about new features, and notify users about their brand.

In this list, we are going to share 20 cool infographic templates to create amazing designs for your business. You’ll find various maps, charts, bars, icons, titles, pie charts and other elements to help you combine useful infographics!

1. Crooked Stats Infographic Kit

crooked-infographic_kit

2. Weekdone Infographics Kit [freebie]

weekdone-infographics-kit

3. Infographic template

infographic-template_23-2147511271

4. Shopping Infographics Slide Template

shopping-infographics-slide-template

5. Circular templates pack

circular-templates-pack

6. Company time line with road

company-time-line-with-roadmap

7. Options banners

options-banners

8. Classic infographic banners collection

classic-infographic-banners-collection

9. Education infography in flat design

education-infography-in-flat-design

10. Set of useful infographic elements in flat design

set-of-useful-infographic-elements-in-flat-design_23-2147612321

11. Infographic template

infographic-template_cool

12. Nice businessman with speech bubbles

nice-businessman-with-speech-bubbles_23-2147571065

13. World map infographic design

world-map-infographic-design_1176-195

14. Cycle Chart with Four Elements Slide

cycle-chart-with-four-elements-slide_1262-6902

15. Free Infographic Vector Template

free-infographic-vector-template

16. Free Vector Infographic Elements

infographics-kitbasic

17. Free Flat Chart Infographic Vector

infographics-tablet

18. Free Vector Infographic Elements

free-vector-infographic-elements

19. Timeline Infographic Vectors

timeline-infographic-vectors

20. World Map Infographic design

world-map-infographic-vector

Read More at 20 Cool Infographic Templates to Create Amazing Designs



from Web Design Ledger https://webdesignledger.com/20-cool-infographic-templates-to-create-amazing-designs/

Friday, 22 December 2017

25 Free Watercolor Brush Sets to Use in Your Designs

Photoshop tools like icons, brushes, shapes, fonts, help designers and photographers get more work done faster without compromising quality. All of these design elements are available online for free.

In this collection, we have handpicked 25 free watercolor brush sets to use in your designs. You can use them to create beautiful textures, headers, social media images, banners, flyers, posters, business cards and more. The collection has splashes of watercolor with different sizes and shape, so you’ll definitely choose what you need.

1. Watercolor Splatters

Watercolor-Splatters

2. Dried Blood Splatters

Dried-Blood-Splatters

3. 25 Watercolor and Ink Photoshop Brushes No.4

25-watercolor-ink-photoshop-brushes

4. WG Watercolor Brushes Vol1

green-red-pink

5. 75 High Quality Watercolor Photoshop Brushes (Vol.2)

high-quality-watercolor-photoshop-brushes-vol-2

6. 69 Watercolor Photoshop Brushes

watercolor-photoshop-brushes-bonus-11-textures

7. 10 Free Watercolor Photoshop Brushes

free-watercolor-photoshop-brushes-10

8. Free Watercolor Photoshop Brushes 6

free-watercolor-photoshop-brushes-6

9. 25 Watercolour and Ink Photoshop Brushes No.5

watercolour-ink-photoshop-brushes

10. Free Watercolor Wash Photoshop Brushes

free-watercolor-wash-photoshop-brushes

11. Free Watercolor Wash Photoshop Brushes 2

free-watercolor-wash-photoshop-brushes-2

12.
Free Watercolor Wash Photoshop Brushes 6

beidge-free-watercolor-wash-photoshop-brushes-2

13. Watercolor Mask PS Brushes

wet-brushes

14. WaterColor Reloaded

WaterColor-Reloaded-98294189

15. WaterColor EXTREMUM

extrem-watercolor

16. Paint Trails brushes

paint-trails

17. watercolor brushes – 1

watercolor-brushes-1

18. 25 Free Paint Brushes

free-paint-brushes

19. 20 Watercolor Mask PS Brushes abr

watercolor-mask-ps-brushes-abr

20. Watercolor Basics

watercolor-basics

21. 20 Watercolor Mask PS Brushes abr.

20-watercolor-mask-ps-brushes-abr

22. WG Dry Paint Strokes

wg-dry-paint-strokes

23. Free Ink Splatter Photoshop Brushes 3

free-ink-splatter-photoshop-brushes

24. Free Concrete Paint Photoshop Brushes 9

free-concrete-paint-photoshop-brushes-9

25. Acrylic Paint

acrylic-paint

Read More at 25 Free Watercolor Brush Sets to Use in Your Designs



from Web Design Ledger https://webdesignledger.com/25-free-watercolor-brush-sets-to-use-in-your-designs/