Header Image

Auto Copy: Chrome extension

Changeset 15

Show
Ignore:
Timestamp:
02/27/10 07:33:51 (2 years ago)
Author:
hill
Message:

background.html: Added fix for windows beep suggested by gregg in the User reviews.

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/background.html

    r8 r15  
    1717            } 
    1818          } else if (req.type === "reformat") { 
    19             var ta = document.getElementById('ta'); 
    20             ta.value = req.text; 
    21             ta.select(); 
    22             document.execCommand("copy", false, null); 
     19            if (req.text.length > 0) { 
     20              var ta = document.getElementById('ta'); 
     21              ta.value = req.text; 
     22              ta.select(); 
     23              document.execCommand("copy", false, null); 
     24            } 
    2325          } 
    2426        }