1 var page = require('webpage').create(),
2 system = require('system');
4 if (system.args.length < 2) {
5 console.log('Usage: loadurlwithoutcss.js URL');
9 var address = system.args[1];
11 page.onResourceRequested = function(requestData, request) {
12 if ((/http:\/\/.+?\.css/gi).test(requestData['url']) || requestData['Content-Type'] == 'text/css') {
13 console.log('The url of the request is matching. Aborting: ' + requestData['url']);
18 page.open(address, function(status) {
19 if (status === 'success') {
22 console.log('Unable to load the address!');