Skip to content

Commit

Permalink
Added script injection
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeenan committed Aug 1, 2022
1 parent dabf231 commit 7141e67
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
5 changes: 4 additions & 1 deletion www/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,10 @@
</label>
<textarea class="large" id="injectScript" type="text" class="text" name="injectScript" value=""></textarea>
</li>
</ul>
<li>
<input type="checkbox" name="injectScriptAllFrames" id="injectScriptAllFrames" class="checkbox" style="float: left;width: auto;">
<label for="injectScriptAllFrames" class="auto_width">Inject script into all frames and run before any page scripts run (Chrome-only)</label>
</li> </ul>
</div>
<div id="advanced-chrome" class="test_subbox ui-tabs-hide">
<p>Chrome-specific advanced settings:</p>
Expand Down
16 changes: 1 addition & 15 deletions www/robots.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,2 @@
User-agent: *
Disallow: /result/
Disallow: /testlog/
Disallow: /testlog.php
Disallow: /forums/attachment.php
Disallow: /forums/member.php
Disallow: /forums/memberlist.php
Disallow: /forums/calendar.php
Disallow: /forums/misc.php
Disallow: /results/
Disallow: /apc/
Disallow: /work/
Allow: /

User-agent: Mediapartners-Google
Allow: /
Disallow: /
4 changes: 4 additions & 0 deletions www/runtest.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
if (isset($_REQUEST['injectScript']) && strlen($_REQUEST['injectScript'])) {
$test['injectScript'] = $_REQUEST['injectScript'];
}
$test['injectScriptAllFrames'] = isset($_REQUEST['injectScriptAllFrames']) && $_REQUEST['injectScriptAllFrames'] ? 1 : 0;
$test['runs'] = isset($req_runs) ? (int)$req_runs : 0;
$test['fvonly'] = isset($req_fvonly) ? (int)$req_fvonly : 0;
if (isset($_REQUEST['rv'])) {
Expand Down Expand Up @@ -2908,6 +2909,9 @@ function CreateTest(&$test, $url, $batch = 0, $batch_locations = 0)
if (isset($test['injectScript'])) {
$job['injectScript'] = $test['injectScript'];
}
if (isset($test['injectScriptAllFrames']) && $test['injectScriptAllFrames']) {
$job['injectScriptAllFrames'] = 1;
}
if (isset($test['noopt']) && $test['noopt']) {
$job['noopt'] = 1;
}
Expand Down

0 comments on commit 7141e67

Please sign in to comment.