@@ -33,7 +33,8 @@
|
||||
.settings select {
|
||||
font-size: 1em;
|
||||
}
|
||||
.settings input[type=text] {
|
||||
.settings input[type=text],
|
||||
.settings input[type=password] {
|
||||
width: 100%;
|
||||
min-width: 4em;
|
||||
}
|
||||
@@ -128,6 +129,7 @@
|
||||
.advanced > div > div.label {
|
||||
width: 25%;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.advanced .subTable {
|
||||
display: table;
|
||||
|
||||
@@ -14,7 +14,7 @@ apiService.factory('API', ['$location', 'Runs', 'Results', function($location, R
|
||||
waitForSelector: settings.waitForSelector,
|
||||
cookie: settings.cookie,
|
||||
authUser: settings.authUser,
|
||||
authPass: settings.authPass,
|
||||
authPass: settings.authPass
|
||||
};
|
||||
|
||||
if (settings.waitForSelector && settings.waitForSelector !== '') {
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
input[type=text] {
|
||||
input[type=text], input[type=password] {
|
||||
width: 100%;
|
||||
min-width: 4em;
|
||||
}
|
||||
@@ -147,6 +147,7 @@
|
||||
&.label {
|
||||
width: 25%;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</div>
|
||||
<div><input type="text" name="cookie" ng-model="settings.cookie" /></div>
|
||||
</div>
|
||||
<!--<div>
|
||||
<div>
|
||||
<div class="label">
|
||||
Authent
|
||||
<span class="settingsTooltip">
|
||||
@@ -57,10 +57,10 @@
|
||||
</div>
|
||||
<div>
|
||||
<div><span>password</div>
|
||||
<div><input type="text" class="authField" name="authPass" ng-model="settings.authPass" /></div>
|
||||
<div><input type="password" class="authField" name="authPass" ng-model="settings.authPass" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<!--<div>
|
||||
<div class="label">Blocked domains</div>
|
||||
<div>
|
||||
|
||||
@@ -152,8 +152,8 @@ var policies = {
|
||||
"label": "DOM access on scroll",
|
||||
"message": "<p>This rule counts the number of DOM-accessing functions calls on a scroll event, such as queries, readings, writings, bindings and jQuery functions.</p><p>Two scroll events are triggered quickly, one after the other, and only the second one is analyzed so throttled functions are ignored.</p><p>One of the main reasons of a poor scrolling experience is when too much JS is executed on each scroll event. Note that some devices such as smartphones and MacBooks send more scroll events than others.</p><p>Reduce the number of DOM accesses inside scroll listeners. Put DOM queries outside them when possible. Use <a href=\"http://blogorama.nerdworks.in/javascriptfunctionthrottlingan/\" target=\"_blank\">throttling or debouncing</a>.</p>",
|
||||
"isOkThreshold": 1,
|
||||
"isBadThreshold": 12,
|
||||
"isAbnormalThreshold": 25,
|
||||
"isBadThreshold": 20,
|
||||
"isAbnormalThreshold": 35,
|
||||
"hasOffenders": true,
|
||||
"offendersTransformFn": function(offenders) {
|
||||
return offenders;
|
||||
|
||||
@@ -21,7 +21,7 @@ var PhantomasWrapper = function() {
|
||||
|
||||
// Cusomizable options
|
||||
'engine': task.options.phantomasEngine || 'webkit',
|
||||
'timeout': task.options.timeout || 45,
|
||||
'timeout': task.options.timeout || 30,
|
||||
'js-deep-analysis': task.options.jsDeepAnalysis || false,
|
||||
'user-agent': (task.options.device === 'desktop') ? 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36' : null,
|
||||
'tablet': (task.options.device === 'tablet'),
|
||||
|
||||
@@ -33,11 +33,19 @@ var WeightChecker = function() {
|
||||
delete data.toolsResults.phantomas.metrics.requestsList;
|
||||
delete data.toolsResults.phantomas.offenders.requestsList;
|
||||
|
||||
var httpAuth = null;
|
||||
if (data.params && data.params.options && data.params.options.authUser && data.params.options.authPass) {
|
||||
httpAuth = {
|
||||
username: data.params.options.authUser,
|
||||
password: data.params.options.authPass
|
||||
};
|
||||
}
|
||||
|
||||
// Transform every request into a download function with a callback when done
|
||||
var redownloadList = requestsList.map(function(entry) {
|
||||
return function(callback) {
|
||||
|
||||
redownloadEntry(entry)
|
||||
redownloadEntry(entry, httpAuth)
|
||||
|
||||
.then(imageOptimizer.optimizeImage)
|
||||
|
||||
@@ -313,7 +321,7 @@ var WeightChecker = function() {
|
||||
}
|
||||
|
||||
|
||||
function redownloadEntry(entry) {
|
||||
function redownloadEntry(entry, httpAuth) {
|
||||
var deferred = Q.defer();
|
||||
|
||||
function downloadError(message) {
|
||||
@@ -367,6 +375,15 @@ var WeightChecker = function() {
|
||||
timeout: REQUEST_TIMEOUT
|
||||
};
|
||||
|
||||
// Basic auth
|
||||
if (httpAuth) {
|
||||
requestOptions.auth = {
|
||||
user: httpAuth.username,
|
||||
pass: httpAuth.password,
|
||||
sendImmediately: false // Tries a first time without auth, wait for a 401 error before resending
|
||||
};
|
||||
}
|
||||
|
||||
download(requestOptions, entry.contentType, function(error, result) {
|
||||
if (error) {
|
||||
if (error.code === 'ETIMEDOUT') {
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "yellowlabtools",
|
||||
"version": "1.7.7",
|
||||
"version": "1.7.8",
|
||||
"description": "Online tool to audit a webpage for performance and front-end quality issues",
|
||||
"license": "GPL-2.0",
|
||||
"author": {
|
||||
@@ -27,7 +27,7 @@
|
||||
"async": "1.4.2",
|
||||
"body-parser": "1.13.3",
|
||||
"chart.js": "1.0.2",
|
||||
"clean-css": "3.4.1",
|
||||
"clean-css": "3.4.2",
|
||||
"compression": "1.5.2",
|
||||
"cors": "2.7.1",
|
||||
"debug": "2.2.0",
|
||||
@@ -37,8 +37,8 @@
|
||||
"jstoxml": "0.2.3",
|
||||
"lwip": "0.0.7",
|
||||
"meow": "3.3.0",
|
||||
"minimize": "1.7.0",
|
||||
"phantomas": "1.11.0",
|
||||
"minimize": "1.7.1",
|
||||
"phantomas": "1.12.0",
|
||||
"ps-node": "0.0.4",
|
||||
"q": "1.4.1",
|
||||
"request": "2.61.0",
|
||||
|
||||
Reference in New Issue
Block a user