Created
July 25, 2016 11:41
-
-
Save gkio/7e46bc2344d9eb0eb5898c8375447d6c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var casper = require('casper').create(); | |
casper.options.onResourceRequested = function(C, requestData, request) { | |
if ((/https?:\/\/.+?\.css/gi).test(requestData['url']) || requestData['Content-Type'] == 'text/css') { | |
console.log('Skipping CSS file: ' + requestData['url']); | |
request.abort(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment