Skip to content

Commit

Permalink
Switch to CTRL-H
Browse files Browse the repository at this point in the history
  • Loading branch information
marcolussetti committed Oct 14, 2021
1 parent 1a6b055 commit 87e1885
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"manifest_version": 2,
"name": "Hacktoberfest Opt-in Checker",
"version": "1.0",
"description": "Detect whether the repository has opted into the 2020 Hacktoberfest.",
"version": "1.1.0",
"description": "Detect whether the repository has opted into the 2021 Hacktoberfest.",
"icons": {
"96": "icons/icon-96.png",
"48": "icons/icon-48.png"
Expand Down
8 changes: 6 additions & 2 deletions optindetector.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,14 @@ function isGithubProject() {
if (isGithubProject()) {
console.log("[Hacktoberfest Tag Detector] GitHub Project detected");
document.addEventListener("keyup", function (e) {
var key = e.key || e.keyCode;
if (key === 'h' || key === 'KeyH' || key === 72) {
var eObj = window.event ? event : e
// var key = eObj.key || eObj.keyCode;
if (e.ctrlKey && e.key === 'h') {
checkIfEnrolled()
}
//if (key === 'h' || key === 'KeyH' || key === 72) {
// checkIfEnrolled()
//}
});
} else {
console.log("[Hacktoberfest Tag Detector] GitHub Project not detected");
Expand Down

0 comments on commit 87e1885

Please sign in to comment.