Skip to content

Chrome Extension that grabs the web window you are viewing!

Notifications You must be signed in to change notification settings

dimmitt/print-toConsole-andFile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

First Chrome Extension: print-toConsole-andFile

Installation

  1. Download it on the chrome extension store, for free!

  2. Set the extention up for development:

git clone https://github.com/MichaelDimmitt/print-toConsole-andFile.git
cd print-toConsole-andFile
open chrome://extensions

ensure dev tools are enabled in the top right corner of this page
and click load unpacked and go to select the directory for this project

Originally Sourced from example,

https://github.com/orbitbot/chrome-extensions-examples/tree/master/print
https://developer.chrome.com/extensions/samples#search:print

What the example provided:

  1. onclick event on the extension icon runs some javascript.
  2. window.print() - javascript -- sends the rendered html to a physical printer!
    but I did not want to use a printer.

My Changes:

  1. console.log(window.body)
  2. saveAs(window.body)

note: could have also used:
window.document.getElementsByTagName('body')[0].outerHTML

About

Chrome Extension that grabs the web window you are viewing!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published