Discuții » Cerere de creare

求助学习强国每日答题、每周答题网页版辅助脚本

§
Postat în: 18-06-2020

求助学习强国每日答题、每周答题网页版辅助脚本

代码可以参照https://github.com/ivanwhaf/xxqg-helper/blob/master/xxqg_v3.1.3.js

/**********************************************每日答题部分************************************************/

/**

  • @description: 获取填空题题目数组
  • @param: null
  • @return: questionArray */ function getFitbQuestion() { var questionCollections = className("EditText").findOnce().parent(); var questionArray = []; var findBlank = false; var blankCount = 0; var blankNumStr = ""; questionCollections.children().forEach(item => { if (item.className() != "android.widget.EditText") { if (item.text() != "") {//题目段 if (findBlank) { blankNumStr = "|" + blankCount.toString(); questionArray.push(blankNumStr); findBlank = false; } questionArray.push(item.text()); } else { findBlank = true; blankCount += 1; } } }); return questionArray; }

……

Postează un raspuns

Autentifică-te pentru a posta un răspuns.