Skip to content

Instantly share code, notes, and snippets.

@L42y
Last active December 16, 2015 06:19
Show Gist options
  • Select an option

  • Save L42y/5390719 to your computer and use it in GitHub Desktop.

Select an option

Save L42y/5390719 to your computer and use it in GitHub Desktop.

Revisions

  1. L42y revised this gist Apr 15, 2013. 1 changed file with 12 additions and 0 deletions.
    12 changes: 12 additions & 0 deletions L42y.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    var page = require('webpage').create();
    var fs = require("fs");
    page.onLoadStarted = function() {
    console.log('Now loading a new page...');
    };
    page.onLoadFinished = function () {
    var file = fs.open('L42y.html', 'w');
    file.write(page.content);
    file.close();
    phantom.exit();
    };
    page.open('http://localhost:9000/L42y');
  2. L42y revised this gist Apr 15, 2013. 2 changed files with 12 additions and 0 deletions.
    12 changes: 12 additions & 0 deletions directive.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    var page = require('webpage').create();
    var fs = require("fs");
    page.onLoadStarted = function() {
    console.log('Now loading a new page...');
    };
    page.onLoadFinished = function () {
    var file = fs.open('directive.html', 'w');
    file.write(page.content);
    file.close();
    phantom.exit();
    };
    page.open('http://code.angularjs.org/1.1.4/docs/guide/directive');
    File renamed without changes.
  3. L42y created this gist Apr 15, 2013.
    12 changes: 12 additions & 0 deletions phantom.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    var page = require('webpage').create();
    var fs = require("fs");
    page.onLoadStarted = function() {
    console.log('Now loading a new page...');
    };
    page.onLoadFinished = function () {
    var file = fs.open('hepai.html', 'w');
    file.write(page.content);
    file.close();
    phantom.exit();
    };
    page.open('http://hepaimusic.com/');