Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configurable option for CheckLoadDelay #71

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion autoplay.noUpdate.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var enableChen = getPreferenceBoolean("enableChen", false);

var autoRefreshMinutes = 30;
var autoRefreshMinutesRandomDelay = 10;
var autoRefreshSecondsCheckLoadedDelay = 30;
var autoRefreshSecondsCheckLoadedDelay = getPreference("autoRefreshSecondsCheckLoadedDelay",30);

var predictTicks = 0;
var predictJumps = 0;
Expand Down Expand Up @@ -362,6 +362,8 @@ function firstRun() {
options2.appendChild(makeCheckBox("enableFingering", "Enable targeting pointer", enableFingering, toggleFingering, false));
options2.appendChild(makeCheckBox("enableTrollTrack", "Enable tracking trolls", enableTrollTrack, toggleTrackTroll, false));
options2.appendChild(makeNumber("setLogLevel", "Change the log level (you shouldn't need to touch this)", logLevel, 0, 5, updateLogLevel));
options2.appendChild(makeNumber("autoRefreshSecondsCheckLoadedDelay", "Change delay of full load test (in seconds)",
autoRefreshSecondsCheckLoadedDelay,5,300,updateCheckLoadedDelay));

info_box.appendChild(options2);

Expand Down Expand Up @@ -1412,6 +1414,13 @@ function updateLogLevel(event) {
}
}

function updateCheckLoadedDelay(event) {
if(event !== undefined) {
autoRefreshSecondsCheckLoadedDelay = event.target.value;
setPreference("autoRefreshSecondsCheckLoadedDelay", autoRefreshSecondsCheckLoadedDelay);
}
}

function setPreference(key, value) {
try {
if(localStorage !== 'undefined') {
Expand Down