Code Monkey home page Code Monkey logo

snapper's Introduction

Snapper

Your easy-to-use chrome extension for taking screenshots in your browser.

Installation

Option 1 -> Go to the Chrome Web Store and search for "Snapper" or follow the direct link to the extension page and press Add to Chrome.

Option 2 -> Install it from source:

  • clone/download this repo,
  • open Chrome and go to chrome://extensions/,
  • enable "Developer mode",
  • click "Load unpacked extension",
  • select the cloned folder of this repo.

If you can see the icon in the top right of your browser, the installation was successful.

Usage

Use the extension by clicking on the icon in the top right of Chrome. You can see a selection of options for the area you want to screenshot:

  • Custom Area: choose your own area to screenshot
  • Visible Content: screenshot only the content currently visible
  • Full Page: screenshot the whole website

Tip: If none of the options work right after adding the extension to chrome, refresh the website you want to screenshot and it should work as expected afterwards.

After the screenshot has been taken, you will be redirected to a new tab showcasing the created screenshot with an option to download the image.

snapper's People

Contributors

timii avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

snapper's Issues

Before overlay is created, get all currently played videos and only pause them

Currently, all videos on the page are paused when the overlay is active AND all videos are unpaused when the overlay is exited.

Potential problem with this approach:
When there are multiple videos on the page and only one is playing, every other video is being unpaused when exiting the overlay.

Solution to the problem:
When creating the overlay, get only videos that are currently playing, save them in an array and only pause and unpause the videos in the array.

Save created screenshot in local storage

Save created screenshot in local storage to load the last image from storage when reloading the page showing the screenshot. Currently, no image is loaded when reloading.

Build page showcasing the screenshot

  • Center screenshot in box
  • Add styling to rest of page
  • Add buttons to download screenshot (as PNG and PDF )
  • Pass filename to new tab to name the image after it
  • Change tab icon of created tab to same icon as in chrome
  • Add zoom-in/out to captured image
  • Add margin below image (especially for bigger images like a full page screenshot)
  • Choose color palette for captured screenshot site

Add full page screenshot functionality

  • Implement function to create as many visibleContent screenshots as the site is long
  • Cut off top of last image by the amount of the calculated cutoffPercent
  • Find out how to append each visibleContent screenshot to the next one
  • Reset scrolled position after all the screenshots are taken
  • Handle elements with position: fixed to only be displayed in the first screenshot and set their position to block or something that is not fixed and stay on top when scrolling (or after that set display: none until screenshots have been taken to then reset display value)
  • Hide scrollbar while taking screenshots
  • Send the full size screenshot to new tab

Merge multiple listeners into one

Currently, we use multiple functions that call sendMessage just with different action. So make the code cleaner, the goal is to merge all the functions into one function that takes the following arguments:

  • action as a string to call different listeners
  • currentTab as a tab object to use the id of the currentTab in the sendMessage function
  • args as an object with additional information for the specific use case

Additionally, we can merge the listeners into one big listener with a switch case for the different actions, so only one listener per file should be needed. Possibly change single-time requests into a long-lived connections

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.