google-chrome-extension


Chrome Extension - Take screenshot from a URL without showing the page in a tab


My chrome extension is intended to periodically take screenshot from a web URL, and update some local disk data. I know how to do it by opening a new tab and taking the screenshot of it. But is there a way to avoid a new tab being opened, or at least open a hidden tab without annoying the user and doing all this silently?
I don't want to generate screenshots on a server, I need to do this all in the local machine.
I know that my suggestion won't answer the question literrally, but as I noticed there are many questiosn on the web regarding taking sceenshots or grabs of webppage periodically, I'll post it anyway. Others who stumble accross this question might benifit from the answer.
If you are using Mac OSX and don't mind bypassing Chrome all together, one could use webkit2png.
Obtain it either from
http://www.paulhammond.org/webkit2png/http://www.paulhammond.org/webkit2png/
or use Homebrew
brew install webkit2png
and:
webkit2png http://google.com/
The Mac version of webkit2png is derived from a Linux-original, that I've not tested. I mention this because in other questions eslewere on internet and Stack Exchange, Linux was specifically mentioned.
http://khtml2png.sourceforge.net/
and / or
https://github.com/AdamN/python-webkit2png/
I don't know, maybe you could open it in a iframe in the background page?
But html2canvas is a library that lets you do that with only JavaScript. It won't be perfect but I think that's what you're looking for.
Now I think it is more safe doing this using a NPAPI plugin which takes screenshots silently and just call its functions through my chrome extention.
In addition to my previous answer, you might want to checkout http://phantomjs.org/
A JavaScript library that can be easily installed and configured to take screenshots.

Related Links

How to get support tab for Google Chrome extension
How to Log to Console from Chrome Extension?
Chrome Extension - Detecting New Posts on a 4chan thread
Chrome Extension Template (Regex Filter) needed
Tricking a javascript code to think it has a focused window?
my extension keep getting rejected and i don't know why
Can I use an alias to release a chrome extension?
Chrome Extension - make a ribbon
Minimize developer tools window while debugging a chrome extension
Getting emulated mobile view of a temporarily changed html page
Google Chrome extension communicate with Panel
Chrome Extension error: “Unchecked runtime.lastError while running browserAction.setIcon: Icon invalid."
Listen to Keyboard and Mouse Chrome Hosted App
Is it possible to catch requests from another extension?
getSelection fails on top commercial websites, how to unblock?
Chrome extension to capture video of last few minutes of active tab

Categories

HOME
google-chrome-extension
atom-editor
gerrit
netsuite
keycloak
angular-material
hp-exstream
relayjs
xmpp
ios-charts
metatrader4
export-to-csv
windows-azure-storage
task
opentracing
saxon
graphicsmagick
csrf-protection
dcevm
jndi
firebase-crash-reporting
info.plist
tooltipster
entitlements
elasticsearch-ruby
tasklet
fabric8
nameservers
binary-data
iframe-resizer
siesta-swift
typed.js
webtest
wallpaper
jmonkeyengine
http-digest
az-application-insights
sqlite2
dism
preconditions
import-from-excel
babel-core
apple-news
fault
parentheses
pubmed
rails-routing
diagnostics
kbuild
feeds
sqlbulkcopy
pillow
sqldf
smart-table
libpng
ado.net-entity-data-model
elements
underscore.js-templating
angstrom-linux
pagedlist
packagist
design-by-contract
icu4j
metaclass
mutation-observers
retina
citrus-pay
pundit
android-listview
mono-embedding
apache-commons-fileupload
sniffer
remobjects
block-device
oxwall
tablelayout
knuth
mdt
uitouch
htmlcleaner
mechanize-ruby
dealloc
android-2.2-froyo
viadeo
ril
shellexecute
orchardcms-1.7
limejs
http-unit
unc
runas
bubble-chart
osql
adk
gwt-ext
php-parser
gnustep
spyware
vdsp
gcj
mod-auth
f#-powerpack
celltable
h.323
meego
javap
swing-app-framework
eqatec
phonon
pascal-fc
sector
scripting-languages
lzh

Resources

Encrypt Message