Thursday, January 6, 2011

Chrome2Chrome - lets move browser tabs between computers ;-)

Some time ago I created new plugin for Google Chrome.
It is called Chrome2Chrome and works similar to Chrome2Phone. But instead of sending pages to your Android phone it is able to send page to another computer with Chrome :-)

Here video showing how it works :-)



Now some details ;-)

If you are using 2 or more computers, sometimes you are reading something on one computer and want to change computer and you may like open on second computer those tabs which you have on first machine.

Normally you may copy addresses of pages and send it to yourselves by e-mail, you may try to type addresses again by hand, you may add page to bookmarks, etc.

With Chrome2Chrome you simply need to click on Chrome2Chrome icon, choose computer where you want to send this tab and this is everything what you need to do :-)
Chrome2Chrome will "move" your tab to selected Chrome installation.

It's not a magic ;-) it's crafty usage of Google Docs ;-).
When you sends your page to another computer Chrome2Chrome creates special file in Google Docs in folder Chrome2Chrome, and second computer reads this file and opens new tab with address from this file :-)

Warnings:
Chrome2Chrome generate rather big traffic, it may be about 10 MB per day (count as 24 hours) per one browser. So if you want to use it on Cr48 you should know that it may simply eat your whole 3G transfer.
Chrome2Chrome creates some files in your Google Docs, all those files are placed in folder Chrome2Chrome, but are also visible in "All items" in Google Docs.
Chrome2Chrome stores your Google Account credentials in your Chrome, so NEVER use it on machine where somebody may have access to it.

It's beta, so it may have some problems :-) After installation you need to go to Chrome2Chrome icon and provide your Google Account credentials, and name of computer. This name will identify browser.
After setting Google Account credentials and computer name you should wait about 15 seconds and go again to Chrome2Chrome icon and to check if you can see this newly "crated" computer in "Send To", if not, please repeat setting name and credentials.
I never had problems here, but I heard about people who had problems...

You may download Chrome2Chrome from Chrome Web Store:-)

Hope you like it :-)

Similar postsbeta
My road to automation ;-)
How to get negative number from size() in LinkedList in Java? ;-)
CallLoger ;-) Invigilate yourself ;-)
OOo2GD - surveys results
ePubGenerator v0.0.3 - from OpenOffice.org to EPUB :-)

Wednesday, January 5, 2011

Google Buzz - let's mark some comments as not spam ;-) or how to unhide "hidden" comments ;-)

[this is translation from my blog post in Polish, so sorry for strange language ;-)]

I think Google Buzz is the best social network/system. FB is way too boring, Twitter with 140 characters is too cryptic for me, but Google Buzz is perfect.

But Google Buzz has some problems ;-) It can hide some comments......

After my investigation I think I found solution for this problem ;-) It will require some effort, but if you like your followers you may do some work for them ;-)

Lets start from some observation. All comments to your Buzz posts are visible in your stream when you are using API, but in web interface some comments disappear. You cannot see some comments on your profile (here is my profile ;-)).
But if you will go to your stream in GMAIL (by click on your profile in Buzz in GMAIL), what looks like this:



and will inspect comments with DOM Inspector or something similar (I was using Chrome developers tools) you will see that in DOM you have those invisible comments....

Here such post, on the first sight it looks that it has only 2 comments (sorry, it is in Polish, but we are interested only in this that here we can see only 2 comments):



But when we will inspect this with DOM inspector, we will see that one comment is hidden:



This hidden comment is differ from the rest of comments, it has additional class "zl", deleting of this class will cause that we will see this "invisible" comment:



How you can see this comment is crossed out, but visible.
But it isn't end yet.
If you will look into DOM, you will see that one of child nodes of node with this comment is:



So it has some "buttons", but those "buttons" aren't visible.
Inspecting other nodes we will find that one of those "buttons", exactly "Not Spam" is visible when we will add to this node class "xq":



When we will add this class, comment will look like this:



Now you may click Not Spam, and if you will do it, GMAIL will send request to URL
https://mail.google.com/mail/?ui=2&ik=<user_ID?>&rid=mail%3Ara.14bf.5.0&at=<some other user_ID?>&view=up&act=ra&rai=<post_ID>&raat=NOT_SPAM&_reqid=1783035&pcd=1&mb=0&rt=j

After click, this comment will change to:



And now the best part ;-) It will be visible for everyone who is able to see this buzz.

Now some code ;-)

If you have problems with Google Buzz and you want to be able to "restore" comments in way as I shown, here you will find some code.
You need to put it in address bar, or add it as bookmark and use this bookmark, when you will be on your stream view in GMAIL (my stream is visible on first image, to see your stream go to Buzz in GMAIL and click on your name :-)):
javascript:{var z=document.getElementById("canvas_frame").contentDocument.getElementsByClassName("zl"); for (var i=0; i<z.length; i++) z[i].className=z[i].className.replace("zl",""); alert("unhide "+z.length+" items."); var z2=document.getElementById("canvas_frame").contentDocument.getElementsByClassName("I0 Yc"); for (var i=0; i<z2.length; i++) z2[i].className=z2[i].className+" xq"; alert("added Not Spam to "+z.length+" items.");}

This is "delicate" or "subtle" version, which may don't work sometimes. In this case here you have more brutal way:
javascript:{var z=document.getElementById("canvas_frame").contentDocument.getElementsByClassName("zl"); for (var i=0; i<z.length; i++) z[i].className=z[i].className.replace("zl",""); alert("unhide "+z.length+" items."); var z2=document.getElementById("canvas_frame").contentDocument.getElementsByClassName("I0 Yc"); for (var i=0; i<z2.length; i++) z2[i].className=z2[i].className+" xq"; var z3=document.getElementById("canvas_frame").contentDocument.getElementsByClassName("nH Yi"); for (var i=0; i<z3.length; i++) z3[i].className=z3[i].className.replace("Yi","Yf"); alert("unhide "+z3.length+" items."); alert("added Not Spam to "+z.length+" items.");}


Because GMAIL is dynamic, you should run this code several times, till you will not see 0 in each alert message :-)

Now you may click on Not Spam and mark comments as not spam :-)

Hope it will help somebody ;-)

Similar postsbeta
Buzz Troll Remover v0.3.2
How to get negative number from size() in LinkedList in Java? ;-)
OOo2GD - surveys results
I want my Android back!!!!
Programmers love to over complicate...