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
page = require('webpage').create() | |
system = require 'system' | |
if system.args.length is 1 | |
console.log 'Usage: capture-element.coffee <URL> (filename) (#selector)' | |
phantom.exit 1 | |
else | |
address = system.args[1] | |
filename = system.args[2] || 'capture.png' | |
selector = system.args[3] |
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 page = new WebPage(), | |
url = 'http://localhost/a-search-form', | |
stepIndex = 0; | |
/** | |
* From PhantomJS documentation: | |
* This callback is invoked when there is a JavaScript console. The callback may accept up to three arguments: | |
* the string for the message, the line number, and the source identifier. | |
*/ | |
page.onConsoleMessage = function (msg, line, source) { |
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
$output-media-width: true !default; // true = all, otherwise use a list of numeric values (eg. 320px 23em) | |
@mixin media-min-width($bp) { | |
@if type-of($output-media-width) != list { | |
@media (min-width: $bp) { | |
@content; | |
} | |
} @else { | |
$output-bp: find-comparable($bp, $output-media-width); | |
@if not comparable($output-bp, $bp) { |
NewerOlder