()
| 172 | |
| 173 | for (var k in names) { |
| 174 | var wrap = function() { |
| 175 | var n = names[k]; |
| 176 | var r = loadScriptByName(n); |
| 177 | if (!r.script || !r.cond) { |
| 178 | console.log(I18N.getMessage("fatal_error") + " (" + n + ")" +"!!!"); |
| 179 | return; |
| 180 | } |
| 181 | for (var kk in d.options) { |
| 182 | if (!d.options.hasOwnProperty(kk)) continue; |
| 183 | |
| 184 | if (r.script.options[kk] === undefined) { |
| 185 | console.log("set option " + kk + " to " + JSON.stringify(d.options[kk])); |
| 186 | r.script.options[kk] = d.options[kk]; |
| 187 | } |
| 188 | } |
| 189 | for (var e in d.options.override) { |
| 190 | if (r.script.options.override[e] === undefined) { |
| 191 | console.log("set option.override." + e + " to " + JSON.stringify(d.options.override[e])); |
| 192 | r.script.options.override[e] = d.options.override[e]; |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | var time = function() { |
| 197 | r.script = mergeCludes(r.script); |
| 198 | |
| 199 | if (processSource) { |
| 200 | var ss = { url: r.script.fileURL, |
| 201 | src: r.script.textContent, |
| 202 | ask: false, |
| 203 | cb : function() { /* done! */ }, |
| 204 | hash: r.script.hash }; |
| 205 | addNewUserScript(ss); |
| 206 | } else { |
| 207 | r.script.id = scriptParser.getScriptId(r.script.name); |
| 208 | storeScript(r.script.name, r.script, false); |
| 209 | } |
| 210 | |
| 211 | check(); |
| 212 | }; |
| 213 | if (cb) { |
| 214 | running++; |
| 215 | window.setTimeout(time, 10); |
| 216 | } else { |
| 217 | time(); |
| 218 | } |
| 219 | }; |
| 220 | wrap(); |
| 221 | } |
| 222 |
no test coverage detected
searching dependent graphs…