shailesh17 / chrome-reload

Automatically exported from code.google.com/p/chrome-reload
0 stars 0 forks source link

Extension Notification on page change #19

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This is a enhancement request.

It would be useful if the chrome-reload use the new Notification API for 
extensions in Chrome to notify about when a webpage have some change in the 
information.

This could be easily implemented, maybe like this:
* In the button, have a check mark that says something like "Notify on page 
change"

And the doReload function make use this pseudo-code:
before reloading{
 |- Check if the webpage content is in the HTML5 WebStorage
 |- If the content is not there and the Notify option is selected, store it (Note bellow)
}
after reloading {
 |- If the Notify option is selected
   |- Get the page content and compare it to the one stored previously
   |- If the content is different
     |- Send a Notification through the new API
     |- Store the new content
}

Notes:
* The way to store the content should be in the HTML5 webstorage.
* The content of the page should be hasehd to compare easier and faster, and 
not save too much information in the webstorage
* It could use the Paj's MD5 hash function to hash the HTML tree (Or the Body 
tree?) of the DOM. (http://pajhome.org.uk/crypt/md5/)

Original issue reported on code.google.com by ninboy....@gmail.com on 29 Jun 2010 at 7:55