Skip to content

Commit

Permalink
bump vnumber
Browse files Browse the repository at this point in the history
  • Loading branch information
owengregson committed Aug 29, 2024
1 parent 7b3d76e commit 8b97d1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions js/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const qwertyLayout = {
b: [4, 2],
n: [5, 2],
m: [6, 2],
" ": [9, 2], // space mapped to far right
" ": [4, 3], // space mapped below the middle row
};

function calculateDistance(char1, char2) {
Expand All @@ -45,7 +45,7 @@ function getHumanLikeDelay(char, prevChar) {
let delay = baseSpeed;

if (char === " ") {
delay *= 0.5; // Space is typed faster
delay *= 0.85; // Space is typed faster
}

// Increase delay based on the distance between keys
Expand All @@ -55,12 +55,12 @@ function getHumanLikeDelay(char, prevChar) {
}

if (char === prevChar) {
delay *= 0.7; // Typing repeated characters is faster
delay *= 0.77; // Typing repeated characters is faster
}

const commonPairs = ["th", "he", "in", "er", "an"];
if (prevChar && commonPairs.includes(prevChar + char)) {
delay *= 0.85; // Common pairs are typed faster
delay *= 0.65; // Common pairs are typed faster
}

delay += Math.random() * 50 - 25; // Randomness between -25ms to +25ms
Expand Down
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"manifest_version": 3,
"name": "tranquill",
"description": "Real-time automated typing bot for Google Chrome.",
"version": "1.1.4",
"description": "Human-like typing automation for Google Chrome.",
"version": "1.1.6",
"icons": {
"16": "./assets/images/icon_16x.png",
"48": "./assets/images/icon_48x.png",
Expand Down

0 comments on commit 8b97d1f

Please sign in to comment.