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