Color Changing on Mouse Hover Extension

713 views
Skip to first unread message

Suraj G

unread,
Mar 15, 2012, 7:02:48 AM3/15/12
to Chromium-extensions
Hi,

I Need an Extension for google chrome which will change the color whenever i do a mouse hover on any text area.. Please help me as i am very much new to this google chrome extensions development.




Thanks,
Suraj G

Zachary “Gamer_Z.” Yaro

unread,
Mar 18, 2012, 11:15:02 AM3/18/12
to Suraj G, Chromium-extensions

It seems like you could do this by just adding a content script with a stylesheet.  May I ask why you need this?

—Zachary “Gamer_Z.” Yaro

--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.

Devin

unread,
Mar 19, 2012, 4:45:31 PM3/19/12
to Chromium-extensions
I just tested this on the textarea I'm typing this reply (meta
right?!)

Add this css, and textarea's will change to a whitesmoke background
when hovered over (or typed in)

<style type="text/css">
textarea:hover {
background-color: whitesmoke;
}
/*Be cool and easier on the eyes, transition the change:*/
textarea {
-webkit-transition: background-color 0.2s;
}
</style>

If you want to do something programmatically (more than visual styles)
you'll use the onhover event.

You'll probably want to set this content script run_at to
document_idle, as that's the most efficient/responsive, and this code
can definitely choke the browser for a bit.

var tas = document.getElementsByTagName('textarea'); //tas stands for
TextAreaS
for (var index = 0; index < tas.length; index++) {
(function(index){
tas[index].onmouseover = function(e){
console.log('You just hovered over this textarea: ', this);
if (this.value !== this.placeholder) {
console.log('Typed text:', this.value);
}
console.log('Your event object is:', e);
};
}(index))
}


What what feel free to follow me @DevinRhode2 on twitter (or subscribe
on facebook /Devin.Rhode404)

Suraj G

unread,
Mar 20, 2012, 12:18:43 AM3/20/12
to Devin, Chromium-extensions
Hi,

Worked Great! Thanks

Mikael Lampiranta

unread,
Oct 29, 2017, 7:03:28 AM10/29/17
to Chromium-Extensions-Announce, devin...@gmail.com
Can someone make public extension for chrome, maybe with  GUI? :) Please share!
Hi,

Worked Great! Thanks

To unsubscribe from this group, send email to chromium-extensions+unsub...@chromium.org.

Vignesh Vaidyanathan

unread,
Oct 29, 2017, 3:19:48 PM10/29/17
to Chromium-Extensions-Announce, devin...@gmail.com
Hi Mikael,

Could you please give more clarity? Do you want the stuff posted by Devin as a public chrome extension? or you want something new?

Thanks,
Vignesh V
Reply all
Reply to author
Forward
0 new messages