(cb)
| 5240 | } |
| 5241 | |
| 5242 | runWait(cb) { |
| 5243 | let checkEval = null, waitTime = 0; |
| 5244 | if (this.curSiteRule.waitElement) { |
| 5245 | checkEval = async doc => { |
| 5246 | return await this.waitElement(doc); |
| 5247 | }; |
| 5248 | } else if(this.curSiteRule.wait) { |
| 5249 | if (isNaN(this.curSiteRule.wait)) { |
| 5250 | try { |
| 5251 | checkEval = (typeof this.curSiteRule.wait === 'function') ? this.curSiteRule.wait : new AsyncFunction("doc", '"use strict";' + this.curSiteRule.wait); |
| 5252 | } catch(e) { |
| 5253 | debug(e); |
| 5254 | } |
| 5255 | } else { |
| 5256 | waitTime = this.curSiteRule.wait; |
| 5257 | } |
| 5258 | } |
| 5259 | cb(checkEval, waitTime); |
| 5260 | } |
| 5261 | |
| 5262 | findNoNext() { |
| 5263 | if (!this.curSiteRule || !this.curSiteRule.smart || this.curSiteRule.nextLink === 0 || this.possibleRule) return; |
no test coverage detected