MCPcopy Create free account
hub / github.com/Yantesoft/LinuxdoAssistant / getConfig

Function getConfig

linuxdo-helper.user.js:220–233  ·  view source on GitHub ↗

* 获取实际使用的配置(基础配置 × 速度比例) * @returns {Object} 计算后的配置对象

()

Source from the content-addressed store, hash-verified

218 * @returns {Object} 计算后的配置对象
219 */
220 function getConfig() {
221 if (!baseConfig) {
222 baseConfig = getBaseConfig();
223 }
224
225 const ratio = getSpeedRatio();
226
227 return {
228 scrollInterval: Math.max(80, Math.round(baseConfig.scrollInterval / ratio)),
229 scrollStep: Math.max(50, Math.round(baseConfig.scrollStep * ratio)),
230 waitForElement: Math.max(500, Math.round(baseConfig.waitForElement / ratio)),
231 waitingTime: Math.max(300, Math.round(baseConfig.waitingTime / ratio))
232 };
233 }
234
235 // 初始化基础配置
236 baseConfig = getBaseConfig();

Callers 3

waitForElementFunction · 0.85
doScrollFunction · 0.85
scrollCommentFunction · 0.85

Calls 2

getBaseConfigFunction · 0.85
getSpeedRatioFunction · 0.85

Tested by

no test coverage detected