mirror of https://github.com/vitalif/phantomjs
parent
4d916971b3
commit
fdec25ac4c
|
@ -8,7 +8,7 @@ if system.args.length < 2
|
|||
address = system.args[1]
|
||||
|
||||
page.onResourceRequested = (requestData, request) ->
|
||||
if (/http:\/\/.+?\.css/g).test(requestData["url"]) or requestData["Content-Type"] is "text/css"
|
||||
if (/http:\/\/.+?\.css/g).test(requestData["url"]) or requestData.headers["Content-Type"] is "text/css"
|
||||
console.log "The url of the request is matching. Aborting: " + requestData["url"]
|
||||
request.abort()
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ if (system.args.length < 2) {
|
|||
var address = system.args[1];
|
||||
|
||||
page.onResourceRequested = function(requestData, request) {
|
||||
if ((/http:\/\/.+?\.css/gi).test(requestData['url']) || requestData['Content-Type'] == 'text/css') {
|
||||
if ((/http:\/\/.+?\.css/gi).test(requestData['url']) || requestData.headers['Content-Type'] == 'text/css') {
|
||||
console.log('The url of the request is matching. Aborting: ' + requestData['url']);
|
||||
request.abort();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue