JR mturk timer warning

Script will warn you at specific times left for your hit. The times can be set in the options menu.

目前为 2014-12-15 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name JR mturk timer warning
  3. // @version 0.6.9
  4. // @namespace https://gf.qytechs.cn/users/6406
  5. // @description Script will warn you at specific times left for your hit. The times can be set in the options menu.
  6. // @author John Ramirez (JohnnyRS)
  7. // @include http*://*.mturk.com/mturk/continue*
  8. // @include http*://*.mturk.com/mturk/accept*
  9. // @include http*://*.mturk.com/mturk/preview*
  10. // @include http*://*.mturk.com/mturk/myhits*
  11. // @exclude *mturk.com/*HITMONITOR*
  12. // @grant GM_getValue
  13. // @grant GM_setValue
  14. // ==/UserScript==
  15.  
  16. // Warns you with a voice, alarm or colors on the amount of time left for the current hit. You can set your own options
  17. // in the menu at top. There is a male and female voice for the warning. You can turn off the warnings and color.
  18. // the options are saved so you don't have to set it again. You can stop it saving options for the current hit if
  19. // you just want changes for the hit you are on.
  20.  
  21. var gSeconds = 0, gElapsedSeconds = 0, gWorking = false, gDoNotSpeak = false;
  22. var gOptions = {"status":["On",0],"voice":["female",0],"alarm":["Off",0],"color":["On",0]};
  23. var gOptionTimes = {"60":["Off",0],"30":["On",0],"20":["Off",0],"10":["Off",0],"5":["On",0],"1":["On",0],"30s":["On",0]};
  24. var gWarningTimes = {"60":false,"30":false,"20":false,"10":false,"5":false,"1":false,"30s":false};
  25. var gHtmlColors = ["FF0000","FF3322","FF6633","FFAA39","FFCCCC","FFEFEC","FFEFCC","EEEFCC","CCCCBB","CCCCBF","CCCCCC","CCCCDD","CCCCDF","CCCCEE","CCCCEF","CCDDFF","DDDDFF","EEEEFF","EEEEF9","EEEEF6","FFFFF2","FFFFF5","FFFFF8","FFFFFF"];
  26.  
  27. var f60MinutesLeft = new Audio("http://www.allbyjohn.com/sounds/You%20have%20less%20than%201%20hour%20left%20-%20Laura.mp3");
  28. var m60MinutesLeft = new Audio("http://www.allbyjohn.com/sounds/You%20have%20less%20than%201%20hour%20left%20-%20Paul.mp3");
  29. var a60MinutesLeft = new Audio("http://www.allbyjohn.com/sounds/Alarm%2060%20minutes%20left.mp3");
  30. var f30MinutesLeft = new Audio("http://www.allbyjohn.com/sounds/You%20have%20less%20than%2030%20minutes%20left%20-%20laura.mp3");
  31. var m30MinutesLeft = new Audio("http://www.allbyjohn.com/sounds/You%20have%20less%20than%2030%20minutes%20left%20-%20Paul.mp3");
  32. var a30MinutesLeft = new Audio("http://www.allbyjohn.com/sounds/Alarm%2030%20minutes%20left.mp3");
  33. var f20MinutesLeft = new Audio("http://www.allbyjohn.com/sounds/You%20have%20less%20than%2020%20minutes%20left%20-%20laura.mp3");
  34. var m20MinutesLeft = new Audio("http://www.allbyjohn.com/sounds/You%20have%20less%20than%2020%20minutes%20left%20-%20Paul.mp3");
  35. var a20MinutesLeft = new Audio("http://www.allbyjohn.com/sounds/Alarm%2020%20minutes%20left.mp3");
  36. var f10MinutesLeft = new Audio("http://www.allbyjohn.com/sounds/You%20have%20less%20than%2010%20minutes%20left%20-%20Laura.mp3");
  37. var m10MinutesLeft = new Audio("http://www.allbyjohn.com/sounds/You%20have%20less%20than%2010%20minutes%20left%20-%20Paul.mp3");
  38. var a10MinutesLeft = new Audio("http://www.allbyjohn.com/sounds/Alarm%2010%20minutes%20left.mp3");
  39. var f5MinutesLeft = new Audio("http://www.allbyjohn.com/sounds/You%20have%20less%20than%205%20minutes%20left%20-%20Laura.mp3");
  40. var m5MinutesLeft = new Audio("http://www.allbyjohn.com/sounds/You%20have%20less%20than%205%20minutes%20left%20-%20Paul.mp3");
  41. var a5MinutesLeft = new Audio("http://www.allbyjohn.com/sounds/Alarm%205%20minutes%20left.mp3");
  42. var f1MinuteLeft = new Audio("http://www.allbyjohn.com/sounds/You%20have%20less%20than%201%20minute%20left%20-%20Laura.mp3");
  43. var m1MinuteLeft = new Audio("http://www.allbyjohn.com/sounds/You%20have%20less%20than%201%20minute%20left%20-%20Paul.mp3");
  44. var a1MinuteLeft = new Audio("http://www.allbyjohn.com/sounds/Alarm%201%20minute%20left.mp3");
  45. var f30SecondsLeft = new Audio("http://www.allbyjohn.com/sounds/You%20have%20less%20than%2030%20seconds%20left%20-%20Laura.mp3");
  46. var m30SecondsLeft = new Audio("http://www.allbyjohn.com/sounds/You%20have%20less%20than%2030%20seconds%20left%20-%20Paul.mp3");
  47. var a30SecondsLeft = new Audio("http://www.allbyjohn.com/sounds/Alarm%2030%20seconds%20left.mp3");
  48. var fTesting = new Audio("http://www.allbyjohn.com/sounds/This%20is%20just%20a%20test%20of%20this%20warning%20system%20-%20Laura.mp3");
  49. var mTesting = new Audio("http://www.allbyjohn.com/sounds/This%20is%20just%20a%20test%20of%20this%20warning%20system%20-%20Paul.mp3");
  50. var g60MinutesLeft = null, g30MinutesLeft = null, g20MinutesLeft = null, g10MinutesLeft = null, g5MinutesLeft = null, g1MinutesLeft = null,
  51. g30SecondsLeft = null, gTesting = null;
  52.  
  53. function loadSettings() {
  54. gOptions = JSON.parse(GM_getValue("JR_WN_options",JSON.stringify(gOptions)));
  55. gOptionTimes = JSON.parse(GM_getValue("JR_WN_optionTimes",JSON.stringify(gOptionTimes)));
  56. }
  57. function saveSettings() {
  58. GM_setValue("JR_WN_options",JSON.stringify(gOptions));
  59. GM_setValue("JR_WN_optionTimes",JSON.stringify(gOptionTimes));
  60. }
  61. function createMyElement(elementName,theClass,theId,theStyle,theText) {
  62. var theElement = document.createElement(elementName);
  63. if (theClass) theElement.className = theClass;
  64. if (theId) theElement.id = theId;
  65. if (theStyle) theElement.setAttribute("style",theStyle);
  66. if (theText) theElement.innerHTML = theText;
  67. return theElement;
  68. }
  69. function createCheckbox(theClass,theId,theValue,theName,theStyle) {
  70. var theCheckbox = createMyElement("input",theClass,theId,theStyle);
  71. theCheckbox.value = theValue;
  72. theCheckbox.type = "checkbox";
  73. if (theName) theCheckbox.name = theName;
  74. return theCheckbox;
  75. }
  76. function createTextInput(theClass,theId,theValue,theName,theStyle) {
  77. var theInput = createMyElement("input",theClass,theId,theStyle);
  78. theInput.type = "text";
  79. if (theValue) theInput.value = theValue;
  80. if (theName) theInput.name = theName;
  81. return theInput;
  82. }
  83. function setUpVoices(gender) {
  84. if (gender == "Female") {
  85. g60MinutesLeft = f60MinutesLeft; g30MinutesLeft = f30MinutesLeft; g20MinutesLeft = f20MinutesLeft; g10MinutesLeft = f10MinutesLeft;
  86. g5MinutesLeft = f5MinutesLeft; g1MinuteLeft = f1MinuteLeft; g30SecondsLeft = f30SecondsLeft; gTesting = fTesting;
  87. } else if (gender == "Male") {
  88. g60MinutesLeft = m60MinutesLeft; g30MinutesLeft = m30MinutesLeft; g20MinutesLeft = m20MinutesLeft; g10MinutesLeft = m10MinutesLeft;
  89. g5MinutesLeft = m5MinutesLeft; g1MinuteLeft = m1MinuteLeft; g30SecondsLeft = m30SecondsLeft; gTesting = mTesting;
  90. } else {
  91. g60MinutesLeft = a60MinutesLeft; g30MinutesLeft = a30MinutesLeft; g20MinutesLeft = a20MinutesLeft; g10MinutesLeft = a10MinutesLeft;
  92. g5MinutesLeft = a5MinutesLeft; g1MinuteLeft = a1MinuteLeft; g30SecondsLeft = a30SecondsLeft; gTesting = a30SecondsLeft;
  93. }
  94. }
  95. function setColor(theTimeLeft) {
  96. var theColor = "FFFFFF";
  97. if (theTimeLeft<30) theColor = gHtmlColors[0]; // less than 30 seconds
  98. else if (theTimeLeft<60) theColor = gHtmlColors[1]; // less than 1 minute
  99. else if (theTimeLeft<600) {
  100. theColor = gHtmlColors[Math.ceil(theTimeLeft/60)]; // less than 10 minutes
  101. }
  102. else if (theTimeLeft<1200) {
  103. theColor = gHtmlColors[Math.ceil((theTimeLeft-600)/120)+10]; // less than 20 minutes
  104. }
  105. else if (theTimeLeft<1800) {
  106. theColor = gHtmlColors[Math.ceil((theTimeLeft-1200)/240)+15]; // less than 30 minutes
  107. }
  108. else if (theTimeLeft<2100) theColor = gHtmlColors[20];
  109. else if (theTimeLeft<2400) theColor = gHtmlColors[21];
  110. else if (theTimeLeft<3000) theColor = gHtmlColors[22];
  111. else if (theTimeLeft<2600) theColor = gHtmlColors[23];
  112. document.getElementsByTagName("form")[1].style.backgroundColor = "#"+theColor;
  113. }
  114. function timeLeft() {
  115. theTime = document.getElementById("theTime");
  116. if (theTime) {
  117. var theSplit = theTime.innerHTML.split(":");
  118. hours = parseInt(theSplit[0]);
  119. minutes = parseInt(theSplit[1]);
  120. seconds = parseInt(theSplit[2]);
  121. minutes += hours * 60;
  122. gElapsedSeconds = seconds + (minutes * 60);
  123. var timeLeftMinutes = Math.floor(gSeconds/60) - minutes - 1;
  124. document.getElementById("timeLeftDiv").innerHTML = "Time Left: " + timeLeftMinutes + " Minutes : " + (60-seconds) + " Seconds";
  125. return gSeconds - gElapsedSeconds;
  126. } else return null;
  127. }
  128. function warning(theSound,theTime) {
  129. theSound.play();
  130. gWarningTimes[theTime] = true;
  131. }
  132. function checkTimes(announceNow) {
  133. var timeLeftSeconds = timeLeft();
  134. var timeLeftMinutes = Math.floor(timeLeftSeconds/60);
  135. if (timeLeftSeconds) {
  136. if (timeLeftSeconds<=30) {
  137. if (gOptionTimes["30s"][0] == "On" && !gWarningTimes["30s"]) warning(g30SecondsLeft,"30s");
  138. } else if (timeLeftSeconds<=60) {
  139. if (gOptionTimes["1"][0] == "On" && !gWarningTimes["1"]) warning(g1MinuteLeft,"1");
  140. } else if (timeLeftMinutes<5 && (timeLeftMinutes>3 || announceNow)) {
  141. if (gOptionTimes["5"][0] == "On" && (!gWarningTimes["5"] || announceNow))
  142. if (gElapsedSeconds>185 || announceNow) warning(g5MinutesLeft,"5");
  143. } else if (timeLeftMinutes<10 && (timeLeftMinutes>7 || announceNow)) {
  144. if (gOptionTimes["10"][0] == "On" && (!gWarningTimes["10"] || announceNow))
  145. if (gElapsedSeconds>185 || announceNow) warning(g10MinutesLeft,"10");
  146. } else if (timeLeftMinutes<20 && (timeLeftMinutes>15 || announceNow)) {
  147. if (gOptionTimes["20"][0] == "On" && (!gWarningTimes["20"] || announceNow))
  148. if (gElapsedSeconds>305 || announceNow) warning(g20MinutesLeft,"20");
  149. } else if (timeLeftMinutes<30 && (timeLeftMinutes>24 || announceNow)) {
  150. if (gOptionTimes["30"][0] == "On" && (!gWarningTimes["30"] || announceNow))
  151. if (gElapsedSeconds>365 || announceNow) warning(g30MinutesLeft,"30");
  152. } else if (timeLeftMinutes<60 && (timeLeftMinutes>53 || announceNow)) {
  153. if (gOptionTimes["60"][0] == "On" && (!gWarningTimes["60"] || announceNow))
  154. if (gElapsedSeconds>425 || announceNow) warning(g60MinutesLeft,"60");
  155. }
  156. if (gOptions.color[0] == "On") setColor(timeLeftSeconds);
  157. else document.getElementsByTagName("form")[1].style.backgroundColor = "#FFFFFF";
  158. }
  159. }
  160. function setOptions() {
  161. gOptions.status[0] = document.getElementById("warningOption").getAttribute("currentValue");
  162. gOptions.status[1] = document.getElementById("warningOption").getAttribute("valueIndex");
  163. gOptions.voice[0] = document.getElementById("warningVoiceOptions").getAttribute("currentValue");
  164. gOptions.voice[1] = document.getElementById("warningVoiceOptions").getAttribute("valueIndex");
  165. gOptions.alarm[0] = document.getElementById("warningAlarmOptions").getAttribute("currentValue");
  166. gOptions.alarm[1] = document.getElementById("warningAlarmOptions").getAttribute("valueIndex");
  167. gOptions.color[0] = document.getElementById("warningColorOptions").getAttribute("currentValue");
  168. gOptions.color[1] = document.getElementById("warningColorOptions").getAttribute("valueIndex");
  169. gOptionTimes["60"][0] = document.getElementById("1HourOptions").getAttribute("currentValue");
  170. gOptionTimes["60"][1] = document.getElementById("1HourOptions").getAttribute("valueIndex");
  171. gOptionTimes["30"][0] = document.getElementById("30MinutesOptions").getAttribute("currentValue");
  172. gOptionTimes["30"][1] = document.getElementById("30MinutesOptions").getAttribute("valueIndex");
  173. gOptionTimes["20"][0] = document.getElementById("20MinutesOptions").getAttribute("currentValue");
  174. gOptionTimes["20"][1] = document.getElementById("20MinutesOptions").getAttribute("valueIndex");
  175. gOptionTimes["10"][0] = document.getElementById("10MinutesOptions").getAttribute("currentValue");
  176. gOptionTimes["10"][1] = document.getElementById("10MinutesOptions").getAttribute("valueIndex");
  177. gOptionTimes["5"][0] = document.getElementById("5MinutesOptions").getAttribute("currentValue");
  178. gOptionTimes["5"][1] = document.getElementById("5MinutesOptions").getAttribute("valueIndex");
  179. gOptionTimes["1"][0] = document.getElementById("1MinuteOptions").getAttribute("currentValue");
  180. gOptionTimes["1"][1] = document.getElementById("1MinuteOptions").getAttribute("valueIndex");
  181. gOptionTimes["30s"][0] = document.getElementById("30SecondsOptions").getAttribute("currentValue");
  182. gOptionTimes["30s"][1] = document.getElementById("30SecondsOptions").getAttribute("valueIndex");
  183. if (gOptions.voice[0] != "Off") setUpVoices(gOptions.voice[0]);
  184. else if (gOptions.alarm[0] != "Off") setUpVoices();
  185. if (gWorking) {
  186. if (gOptions.color[0] == "On" && gOptions.status[0] == "On") setColor(timeLeft());
  187. else document.getElementsByTagName("form")[1].style.backgroundColor = "#FFFFFF";
  188. if (!gDoNotSpeak && gOptions.status[0] == "On" && (gOptions.voice[0] != "Off" || gOptions.alarm[0] != "Off")) checkTimes(true);
  189. } else if (gOptions.status[0] == "On" && (gOptions.voice[0] != "Off" || gOptions.alarm[0] != "Off") && !gDoNotSpeak) gTesting.play();
  190. if (document.getElementById("warningOptionsSave").checked) saveSettings();
  191. }
  192. function createSpanOptions(theNode,theOptions) {
  193. var theId = "", theText = "", theValues = [], theStatus = "", replaceWith="";
  194. for (var i=0,len=theOptions.length; i<len; i++) {
  195. theId = theOptions[i][0];
  196. theText = theOptions[i][1];
  197. theValues = theOptions[i][2];
  198. theStatus = theValues[theOptions[i][3]].substr(0,1);
  199. replaceWith = theValues[theOptions[i][3]].replace(theStatus,"");
  200. theOption = createMyElement("span","myOwnDiv",theId,"cursor:pointer",theText.replace("$",replaceWith));
  201. if (theStatus=="-") theOption.style.color = "#FF0000";
  202. else theOption.style.color = "#006600";
  203. theOption.setAttribute("theValues",JSON.stringify(theValues));
  204. theOption.setAttribute("valueIndex",theOptions[i][3]);
  205. theOption.setAttribute("theText",theText);
  206. theOption.setAttribute("currentValue",replaceWith);
  207. theNode.appendChild(document.createTextNode(" "));
  208. theNode.appendChild(theOption);
  209. theOption.onclick = function() {
  210. gDoNotSpeak = false;
  211. var theValues = JSON.parse(this.getAttribute("theValues"));
  212. var theIndex = parseInt(this.getAttribute("valueIndex"));
  213. var theText = this.getAttribute("theText");
  214. theIndex = (theIndex < theValues.length-1) ? theIndex+1 : 0;
  215. this.setAttribute("valueIndex",theIndex);
  216. var theStatus = theValues[theIndex].substr(0,1);
  217. var replaceWith = theValues[theIndex].replace(theStatus,"");
  218. this.innerHTML = theText.replace("$",replaceWith);
  219. this.setAttribute("currentValue",replaceWith);
  220. if (theStatus=="-") this.style.color = "#FF0000";
  221. else this.style.color = "#006600";
  222. if (this.id == "warningAlarmOptions" && replaceWith == "On") {
  223. document.getElementById("warningVoiceOptions").setAttribute("currentValue","Off");
  224. document.getElementById("warningVoiceOptions").setAttribute("valueIndex","1");
  225. document.getElementById("warningVoiceOptions").innerHTML = "[ Voice: Off ]";
  226. document.getElementById("warningVoiceOptions").style.color = "#FF0000";
  227. } else if (this.id == "warningVoiceOptions" && replaceWith != "Off") {
  228. document.getElementById("warningAlarmOptions").setAttribute("currentValue","Off");
  229. document.getElementById("warningAlarmOptions").setAttribute("valueIndex","0");
  230. document.getElementById("warningAlarmOptions").innerHTML = "[ Alarm: Off ]";
  231. document.getElementById("warningAlarmOptions").style.color = "#FF0000";
  232. } else if (this.id == "warningOption" && replaceWith == "Off") {
  233. gDoNotSpeak = true;
  234. } else if (this.id == "warningColorOptions") gDoNotSpeak = true;
  235. setOptions();
  236. };
  237. }
  238. }
  239. function showOptions(beforeNode) {
  240. var theOptionsContainer = createMyElement("div","myOwnDiv","warningOptionsContainer",
  241. "background-color:#D8FCFB; text-align:center; margin:0 auto; padding: 0; width:80%; border: 2px solid black;");
  242. var theOptionsToggle = createMyElement("div","myOwnDiv","warningOptionsToggle","margin:0; padding:0 0 2px 0; background-color:#696969; color: Aqua; font-size:10px; cursor:default;",
  243. "Click here for Time Left Warning options.");
  244. var theOptionsControl = createMyElement("div","myOwnDiv","warningOptionsController","display:none;");
  245. var theOptionsSave = createCheckbox("myOwnCheckBox","warningOptionsSave","save Me","","margin-left:20px; height:10px;");
  246. theOptionsSave.checked = true;
  247. theOptionsSave.onclick = function() { if (theOptionsSave.checked) saveSettings(); }
  248.  
  249. var spanWarningOptions = [ ["warningOption","[ Status: $ ]",["+On","-Off"],gOptions.status[1]], ["warningVoiceOptions","[ Voice: $ ]",["+Female","-Off","+Male"],gOptions.voice[1]],
  250. ["warningAlarmOptions","[ Alarm: $ ]",["-Off","+On"],gOptions.alarm[1]], ["warningColorOptions","[ Color: $ ]",["+On","-Off"],gOptions.color[1]]];
  251. theOptionsControl.appendChild(document.createTextNode("Time Left Warning:"));
  252. createSpanOptions(theOptionsControl,spanWarningOptions);
  253. theOptionsControl.appendChild(theOptionsSave);
  254. theOptionsControl.appendChild(document.createTextNode(" Save Options"));
  255. theOptionsControl.appendChild(createMyElement("br"));
  256. theOptionsControl.appendChild(document.createTextNode("Warn at: "));
  257. var spanTimeOptions = [ ["30SecondsOptions","[30 seconds]",["+On","-Off"],gOptionTimes["30s"][1]], ["1MinuteOptions","[1 minute]",["+On","-Off"],gOptionTimes["1"][1]],
  258. ["5MinutesOptions","[5 minutes]",["+On","-Off"],gOptionTimes["5"][1]], ["10MinutesOptions","[10 minutes]",["-Off","+On"],gOptionTimes["10"][1]],
  259. ["20MinutesOptions","[20 minutes]",["-Off","+On"],gOptionTimes["20"][1]], ["30MinutesOptions","[30 minutes]",["+On","-Off"],gOptionTimes["30"][1]],
  260. ["1HourOptions","[1 hour]",["-Off","+On"],gOptionTimes["60"][1]]];
  261. createSpanOptions(theOptionsControl,spanTimeOptions);
  262. theOptionsControl.appendChild(createMyElement("br"));
  263. theOptionsControl.appendChild(document.createTextNode("Click on text above to change options."));
  264. theOptionsToggle.onclick = function() {
  265. var theDisplay = theOptionsControl.style.display;
  266. theOptionsControl.style.display = (theDisplay == "none") ? "block" : "none";
  267. if (theOptionsControl.style.display == "none") this.innerHTML = "Click here for Time Left Warning options menu.";
  268. else this.innerHTML = "Click here to hide the options menu";
  269. }
  270. theOptionsContainer.appendChild(theOptionsToggle);
  271. theOptionsContainer.appendChild(theOptionsControl);
  272. beforeNode.parentNode.insertBefore(theOptionsContainer,beforeNode);
  273. }
  274.  
  275. loadSettings();
  276. setUpVoices(gOptions.voice[0]);
  277. var timerTextNode = document.getElementsByClassName("title_orange_text")[0];
  278. if (timerTextNode && timerTextNode.innerHTML.indexOf("Timer:") != -1) {
  279. gWorking = true;
  280. var weeks = 0, days = 0, hours = 0, minutes = 0;
  281. var theTime = document.getElementById("theTime");
  282. var timeLeftNode = createMyElement("div","myOwnDiv","timeLeftDiv","padding-left:20px");
  283. theTime.parentNode.parentNode.parentNode.appendChild(timeLeftNode);
  284. var ofTime = timerTextNode.innerHTML.split("</span>")[1];
  285. var ofTime = ofTime.split("<noscript>")[0].replace(/\s\s+/g," ").trim();
  286. var theSplit = ofTime.replace("of ","").split(" ");
  287. if (theSplit.length > 0) {
  288. if (theSplit > 2) {
  289. if (theSplit[3].indexOf("week") != -1) weeks = parseInt(theSplit[2]);
  290. else if (theSplit[3].indexOf("day") != -1) days = parseInt(theSplit[2]);
  291. else if (theSplit[3].indexOf("hour") != -1) hours = parseInt(theSplit[2]);
  292. }
  293. days += weeks * 7;
  294. hours += days * 24;
  295. if (theSplit[1].indexOf("day") != -1) days += parseInt(theSplit[0]);
  296. else if (theSplit[1].indexOf("hour") != -1) hours += parseInt(theSplit[0]);
  297. else if (theSplit[1].indexOf("minute") != -1) minutes = parseInt(theSplit[0]);
  298. else if (theSplit[1].indexOf("second") != -1) gSeconds = parseInt(theSplit[0]);
  299. hours += days * 24;
  300. minutes += hours * 60;
  301. gSeconds += minutes * 60;
  302. var intervalVar = setInterval( function(){
  303. if (gOptions.status[0] == "On" && (gOptions.voice[0] != "Off" || gOptions.alarm[0] != "Off")) checkTimes();
  304. else if (gOptions.status[0] == "On") timeLeft();
  305. }, 4000);
  306. var theHitForm = document.getElementsByTagName("form")[1];
  307. var theTable = theHitForm.getElementsByTagName("table")[0];
  308. var theDiv = theHitForm.getElementsByTagName("div")[2];
  309. var theIframe = theHitForm.getElementsByTagName("iframe")[0];
  310. theTable.style.backgroundColor = "#FFFFFF";
  311. theDiv.style.backgroundColor = "#FFFFFF";
  312. theIframe.style.backgroundColor = "#FFFFFF";
  313. showOptions(theHitForm);
  314. if (gOptions.color[0] == "On" && gOptions.status[0] == "On") setColor(timeLeft());
  315. else document.getElementsByTagName("form")[1].style.backgroundColor = "#FFFFFF";
  316. }
  317. } else {
  318. var theAlertBox = document.getElementById("alertBox");
  319. var theErrorTitle = document.getElementsByClassName("error_title")[0];
  320. var beforeNode = (theErrorTitle) ? theErrorTitle.parentNode.parentNode.parentNode : (theAlertBox) ? theAlertBox : timerTextNode.parentNode.parentNode.parentNode;
  321. showOptions(beforeNode);
  322. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址