|
9 | 9 | (function () { |
10 | 10 | "use strict"; |
11 | 11 |
|
12 | | - var cssDependencies = [ |
13 | | - 'src/reporter/niceReporter.css' |
14 | | - ], |
| 12 | + var cssDependencies = ["src/reporter/niceReporter.css"], |
15 | 13 | jsDependencies = [ |
16 | | - 'src/scope.js', |
17 | | - 'src/reporter/pageNavigationHandlingFallback.js', |
18 | | - 'src/reporter/niceReporter.js', |
19 | | - 'src/reporter/urlQueryFilter.js', |
20 | | - 'src/reporter/fallbackFilter.js', |
21 | | - 'src/jobQueue.js', |
22 | | - 'src/browserRenderer.js', |
23 | | - 'src/indexedDbStorage.js', |
24 | | - 'src/util.js', |
25 | | - 'src/reporting.js', |
26 | | - 'src/regression.js', |
27 | | - 'src/main.js', |
28 | | - 'packageVersion.js', |
29 | | - 'src/init.js' |
| 14 | + "src/scope.js", |
| 15 | + "src/reporter/pageNavigationHandlingFallback.js", |
| 16 | + "src/reporter/niceReporter.js", |
| 17 | + "src/reporter/urlQueryFilter.js", |
| 18 | + "src/reporter/fallbackFilter.js", |
| 19 | + "src/jobQueue.js", |
| 20 | + "src/browserRenderer.js", |
| 21 | + "src/indexedDbStorage.js", |
| 22 | + "src/util.js", |
| 23 | + "src/reporting.js", |
| 24 | + "src/regression.js", |
| 25 | + "src/main.js", |
| 26 | + "packageVersion.js", |
| 27 | + "src/init.js", |
30 | 28 | ], |
31 | 29 | externalJsDependencies = [ |
32 | | - 'rasterizehtml/dist/rasterizeHTML.allinone.js', |
33 | | - 'imagediff/imagediff.js', |
34 | | - 'ayepromise/ayepromise.js' |
| 30 | + "rasterizehtml/dist/rasterizeHTML.allinone.js", |
| 31 | + "imagediff/imagediff.js", |
35 | 32 | ]; |
36 | 33 |
|
37 | 34 | var getCurrentScript = function () { |
38 | | - return document.currentScript || (function() { |
39 | | - var scripts = document.getElementsByTagName('script'); |
40 | | - return scripts[scripts.length - 1]; |
41 | | - })(); |
| 35 | + return ( |
| 36 | + document.currentScript || |
| 37 | + (function () { |
| 38 | + var scripts = document.getElementsByTagName("script"); |
| 39 | + return scripts[scripts.length - 1]; |
| 40 | + })() |
| 41 | + ); |
42 | 42 | }; |
43 | 43 |
|
44 | 44 | var getBasePath = function () { |
45 | 45 | var script = getCurrentScript(), |
46 | 46 | src = script.attributes.src.value; |
47 | 47 |
|
48 | | - return src.substring(0, src.lastIndexOf('/') + 1); |
| 48 | + return src.substring(0, src.lastIndexOf("/") + 1); |
49 | 49 | }; |
50 | 50 |
|
51 | 51 | var loadCssDependency = function (path) { |
|
57 | 57 | }; |
58 | 58 |
|
59 | 59 | var loadExternalJsDependency = function (basePath, path) { |
60 | | - loadJsDependency(basePath + '../../node_modules/' + path); |
| 60 | + loadJsDependency(basePath + "../../node_modules/" + path); |
61 | 61 | // Fallback to npm <3 |
62 | | - loadJsDependency(basePath + 'node_modules/' + path); |
| 62 | + loadJsDependency(basePath + "node_modules/" + path); |
63 | 63 | }; |
64 | 64 |
|
65 | 65 | var basePath = getBasePath(); |
|
75 | 75 | jsDependencies.forEach(function (path) { |
76 | 76 | loadJsDependency(basePath + path); |
77 | 77 | }); |
78 | | -}()); |
| 78 | +})(); |
0 commit comments