mirror of
https://github.com/ariya/phantomjs.git
synced 2024-09-11 04:46:09 +03:00
Fix typo in loadurlwithoutcss
example
Issue: https://github.com/ariya/phantomjs/issues/11321
This commit is contained in:
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
Block a user