Skip to content

Commit e62ddd6

Browse files
committed
⚡ ans key input start + stop
1 parent 6767270 commit e62ddd6

File tree

14 files changed

+323
-124
lines changed

14 files changed

+323
-124
lines changed

.github/FUNDING.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# These are supported funding model platforms
2+
github: sauravhathi
3+
patreon: # Replace with a single Patreon username
4+
open_collective: # Replace with a single Open Collective username
5+
ko_fi: # Replace with a single Ko-fi username
6+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
7+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
8+
liberapay: # Replace with a single Liberapay username
9+
issuehunt: # Replace with a single IssueHunt username
10+
otechie: # Replace with a single Otechie username
11+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12+
custom:
13+
- saurav.34@paytm
14+
- https://www.buymeacoffee.com/sauravhathi
15+
- https://donate.stripe.com/aEU7t2d4O5QD024eUU
16+
- https://paypal.me/sauravkumar680

README.md

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,37 @@
11
# Hitbullseye Automate Tool
22

3-
## How to use
3+
Automate your test-taking on [hitbullseye.com](https://www.hitbullseye.com/) with this handy Chrome extension. This tool allows you to answer all the questions in a test with a single click.
44

5-
Change the keys value to your test keys and run the script in the browser console.
5+
## Features
66

7-
#### Note: Install Absolute Enable Right Click extension in your browser to use the script.
7+
- **Effortless Test Taking**: Say goodbye to manual question answering. This tool automates the process for you.
88

9-
https://github.com/sauravhathi/lpu-cse/blob/master/shortway/shortUrl.md
9+
- **Customizable Time Interval**: You can set a time interval (in seconds) between each question attempt to suit your preferences.
1010

11-
1. Open the test in your browser
12-
2. Open the console in your browser
13-
3. Copy the script and paste it in the console
14-
4. Press enter
15-
5. Wait for the test to be submitted
11+
## Getting Started
12+
13+
1. Clone or download this repository.
14+
15+
2. Install the extension in Chrome.
16+
17+
3. Visit [hitbullseye.com](https://www.hitbullseye.com/) and log in.
18+
19+
4. Open the extension, enter the test answer key, and set the time interval.
20+
21+
5. Click "Start" to automate the test-taking process, and "Stop" to halt it.
22+
23+
## Support and Contribution
24+
25+
If you encounter any issues or have suggestions for improvements, please open an issue on the [GitHub repository](https://github.com/sauravhathi/Hitbullseye-Automate-Tool/issues).
26+
27+
Feel free to contribute to this project by submitting pull requests or by addressing any open issues.
28+
29+
## Author
30+
31+
- **Author:** Saurav Hathi
32+
- **GitHub:** [sauravhathi](https://github.com/sauravhathi)
33+
- **LinkedIn:** [Saurav Hathi on LinkedIn](https://www.linkedin.com/in/sauravhathi)
34+
35+
## License
36+
37+
This project is licensed under the MIT License - see the [LICENSE](https://github.com/sauravhathi/Hitbullseye-Automate-Tool/blob/main/LICENSE) file for details.

answer.md

Lines changed: 0 additions & 93 deletions
This file was deleted.

background.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

content.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
console.log('👨‍💻 Author: Saurav Hathi \n🌟 GitHub: https://github.com/sauravhathi \n🚀Linkedin: https://www.linkedin.com/in/sauravhathi');
2+
3+
let inter = null;
4+
5+
chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
6+
if (request.message === "start") {
7+
attempt(request.answer_key, request.time);
8+
} else if (request.message === "stop") {
9+
stopAttempt();
10+
}
11+
});
12+
13+
const attempt = (ans_key, time) => {
14+
const ans = ans_key;
15+
const len = ans.length;
16+
let i = 0;
17+
18+
function attemptQuestion() {
19+
document.querySelector(`#${ans[i]}_${i + 1}`).click();
20+
document.querySelector("#main_div > div.tableWidthPercent > div.onlineTestLeftDiv > div.qnav > span.saveNextButton > a").click();
21+
i++;
22+
23+
if (i === len) {
24+
clearInterval(inter);
25+
document.querySelector('#activator').click();
26+
document.querySelector('input[name="rd"][value="Y"]').click();
27+
if (confirm("Are you sure you want to submit?")) {
28+
document.querySelector('#close_confirmed').click();
29+
}
30+
}
31+
}
32+
33+
inter = setInterval(attemptQuestion, time * 1000 || 1500);
34+
}
35+
36+
function stopAttempt() {
37+
if (inter) {
38+
clearInterval(inter);
39+
console.log("Stopped the attempt");
40+
}
41+
}

images/icon128.png

8.38 KB
Loading

images/icon16.png

1.35 KB
Loading

images/icon32.png

1.86 KB
Loading

images/icon48.png

2.7 KB
Loading

manifest.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "Hitbullseye Automation Tool",
3+
"version": "2.0.0",
4+
"homepage_url": "https://github.com/sauravhathi/Hitbullseye-Automate-Tool",
5+
"description": "Attempt all the questions in a test on hitbullseye.com with a single click.",
6+
"author": "Saurav Hathi",
7+
"manifest_version": 3,
8+
"icons": {
9+
"16": "./images/icon16.png",
10+
"32": "./images/icon32.png",
11+
"48": "./images/icon48.png",
12+
"128": "./images/icon128.png"
13+
},
14+
"background": {
15+
"service_worker": "background.js"
16+
},
17+
"permissions": ["scripting", "activeTab"],
18+
"action": {
19+
"default_popup": "./popup/popup.html"
20+
},
21+
"content_scripts": [
22+
{
23+
"matches": ["https://*.hitbullseye.com/*"],
24+
"css": ["./popup/popup.css"],
25+
"js": ["content.js"]
26+
}
27+
]
28+
}

0 commit comments

Comments
 (0)