Permalink
Browse files

committing updates for sean to give it a go

  • Loading branch information...
billkeller committed Feb 4, 2010
1 parent 9d29532 commit 2fb30405c8a2490b43e3563fc6d14252db83a3ea
Showing with 3 additions and 1 deletion.
  1. +3 −1 addDelicious.js
View
@@ -1,4 +1,5 @@
(function() {
+ var bookmarkKeyCode;
function getVariableFromLocalStorage(variableName,defaultValue) {
this[variableName] = defaultValue;
var onResponse = function (response) {
@@ -12,12 +13,13 @@
chrome.extension.sendRequest({'action': 'getFromLocalStorage', 'variableName': variableName}, onResponse)
};
+
// Listen for key press
window.addEventListener(
'keydown',
function(e) {
// bookmarkKeyCode is always returning "undefined" not sure how to grab it from getVariableFromLocalStorage function
- var bookmarkKeyCode = getVariableFromLocalStorage('bookmarkKeyCode','D');
+ getVariableFromLocalStorage('bookmarkKeyCode','D');
console.log(bookmarkKeyCode);
if (e.which == bookmarkKeyCode && e.altKey) {
console.log('pressed ^d');

0 comments on commit 2fb3040

Please sign in to comment.