Permalink
Browse files

Mouseover/out for bang buttons

  • Loading branch information...
1 parent 7233faa commit 917fbe87499b9d33e24843aca702be5d98504fc4 @mrshu mrshu committed Jul 5, 2014
Showing with 31 additions and 21 deletions.
  1. +31 −21 js/popup.js
View
@@ -115,28 +115,38 @@ window.onload = function() {
}
- document.getElementById('bang_w').onclick = function(){
- add_bang('!w');
- }
- document.getElementById('bang_bi').onclick = function(){
- add_bang('!bi');
- }
- document.getElementById('bang_a').onclick = function(){
- add_bang('!a');
- }
- document.getElementById('bang_gi').onclick = function(){
- add_bang('!gi');
- }
- document.getElementById('bang_n').onclick = function(){
- add_bang('!n');
- }
- document.getElementById('bang_yt').onclick = function(){
- add_bang('!yt');
- }
- document.getElementById('bang_m').onclick = function(){
- add_bang('!m');
- }
+ document.getElementById('bang_w').onclick = function(){
+ add_bang('!w');
+ }
+ document.getElementById('bang_bi').onclick = function(){
+ add_bang('!bi');
+ }
+ document.getElementById('bang_a').onclick = function(){
+ add_bang('!a');
+ }
+ document.getElementById('bang_gi').onclick = function(){
+ add_bang('!gi');
+ }
+ document.getElementById('bang_n').onclick = function(){
+ add_bang('!n');
+ }
+ document.getElementById('bang_yt').onclick = function(){
+ add_bang('!yt');
+ }
+ document.getElementById('bang_m').onclick = function(){
+ add_bang('!m');
+ }
+ var images = document.querySelectorAll('li img');
+ for(var i = 0; i < images.length; i++) {
+ images[i].onmouseover = function() {
+ this.src = BTN_HOVER;
+ }
+
+ images[i].onmouseout = function() {
+ this.src = BTN_NORMAL;
+ }
+ }
defaults_check();

0 comments on commit 917fbe8

Please sign in to comment.