This is just a simple chrome extension
the core code has like one line of actual code for Pick3 and Pick4 right now in fill.js and fillp4.js
I might make one for Jackpot games later.
You just goto chrome://extentions in your chrome browser turn on developer mode
click Load unpacked, the load the folder that contains the files, the when you click the Plug-in (puzzle icon near top right corner of chrome) it'll show up and if you click Populate PredPicks it'll show you 3 buttons that you can use (when you're on the Post Predictions page)
and load this folder it seems I can't attach files or folders but here it is the code to all the files (edit/cut/copy with text editor)
my-extension/
├── manifest.json
├── popup.html
├── popup.js
├── fill.js (pick3 code)
├── fillp4.js (pick4 code)
manifest.json -----------------------------------------------------------------------------------------------------------------------------
{
"manifest_version": 3,
"name": "Populate predPicks",
"version": "1.0",
"permissions": ["scripting", "activeTab"],
"action": {
"default_popup": "popup.html"
}
}
popup.html -----------------------------------------------------------------------------------------------------------------------------
<!DOCTYPE html>
<html>
<head>
<title>Fill predPicks</title>
</head>
<body>
<button id="fillBtn">Pick 3</button>
<button id="fillBtn2">Pick 4</button>
<button id="fillBtn3">TBA...</button>
<script src="popup.js"></script>
</body>
</html>
popup.js -----------------------------------------------------------------------------------------------------------------------------
document.getElementById("fillBtn").addEventListener("click", async () => {
const [tab] = await chrome.tabs.query({ active: true, currentWindow: true });
chrome.scripting.executeScript({
target: { tabId: tab.id },
files: ["fill.js"]
});
});
document.getElementById("fillBtn2").addEventListener("click", async () => {
const [tab] = await chrome.tabs.query({ active: true, currentWindow: true });
chrome.scripting.executeScript({
target: { tabId: tab.id },
files: ["fillp4.js"]
});
});
fill.js -----------------------------------------------------------------------------------------------------------------------------
textarea = document.getElementById("predPicks");
if (textarea) {
textarea.value += ("00"+Math.floor(Math.random()*100)).slice(-3)+"\n";
textarea.dispatchEvent(new Event('input')); // in case site uses input events
} else {
alert("Textarea with ID 'predPicks' not found.");
}
fillp4.js -----------------------------------------------------------------------------------------------------------------------------
textarea = document.getElementById("predPicks");
if (textarea) {
textarea.value += ("000"+Math.floor(Math.random()*1000)).slice(-4)+"\n";
textarea.dispatchEvent(new Event('input')); // in case site uses input events
} else {
alert("Textarea with ID 'predPicks' not found.");
}