I am new to making extensions.
For my content script I'm using content.js and for my background script I'm using background.js.
I want it so while my extension runs in the background in google chrome it prints "Hello" when you click "Shift" while on a specific web page.
Current script without extension:
$(document).keydown(function(e) {
if (e.keyCode == 16) {
if (window.location.href == "https://www.google.com") {
console.log("Hello");
} else {
console.log("Go to https://www.google.com");
}
console.log("Shift Pressed");
return false;
}
})