diff --git a/960_12_col.css b/960_12_col.css deleted file mode 100644 index fbd0c380..00000000 --- a/960_12_col.css +++ /dev/null @@ -1,358 +0,0 @@ - -/* - 960 Grid System ~ Core CSS. - Learn more ~ http://960.gs/ - - Licensed under GPL and MIT. -*/ - -/* - Forces backgrounds to span full width, - even if there is horizontal scrolling. - Increase this if your layout is wider. - - Note: IE6 works fine without this fix. -*/ - -body { - min-width: 960px; -} - -/* `Container -----------------------------------------------------------------------------------------------------*/ - -.container_12 { - margin-left: auto; - margin-right: auto; - width: 960px; -} - -/* `Grid >> Global -----------------------------------------------------------------------------------------------------*/ - -.grid_1, -.grid_2, -.grid_3, -.grid_4, -.grid_5, -.grid_6, -.grid_7, -.grid_8, -.grid_9, -.grid_10, -.grid_11, -.grid_12 { - display: inline; - float: left; - margin-left: 10px; - margin-right: 10px; -} - -.push_1, .pull_1, -.push_2, .pull_2, -.push_3, .pull_3, -.push_4, .pull_4, -.push_5, .pull_5, -.push_6, .pull_6, -.push_7, .pull_7, -.push_8, .pull_8, -.push_9, .pull_9, -.push_10, .pull_10, -.push_11, .pull_11 { - position: relative; -} - -/* `Grid >> Children (Alpha ~ First, Omega ~ Last) -----------------------------------------------------------------------------------------------------*/ - -.alpha { - margin-left: 0; -} - -.omega { - margin-right: 0; -} - -/* `Grid >> 12 Columns -----------------------------------------------------------------------------------------------------*/ - -.container_12 .grid_1 { - width: 60px; -} - -.container_12 .grid_2 { - width: 140px; -} - -.container_12 .grid_3 { - width: 220px; -} - -.container_12 .grid_4 { - width: 300px; -} - -.container_12 .grid_5 { - width: 380px; -} - -.container_12 .grid_6 { - width: 460px; -} - -.container_12 .grid_7 { - width: 540px; -} - -.container_12 .grid_8 { - width: 620px; -} - -.container_12 .grid_9 { - width: 700px; -} - -.container_12 .grid_10 { - width: 780px; -} - -.container_12 .grid_11 { - width: 860px; -} - -.container_12 .grid_12 { - width: 940px; -} - -/* `Prefix Extra Space >> 12 Columns -----------------------------------------------------------------------------------------------------*/ - -.container_12 .prefix_1 { - padding-left: 80px; -} - -.container_12 .prefix_2 { - padding-left: 160px; -} - -.container_12 .prefix_3 { - padding-left: 240px; -} - -.container_12 .prefix_4 { - padding-left: 320px; -} - -.container_12 .prefix_5 { - padding-left: 400px; -} - -.container_12 .prefix_6 { - padding-left: 480px; -} - -.container_12 .prefix_7 { - padding-left: 560px; -} - -.container_12 .prefix_8 { - padding-left: 640px; -} - -.container_12 .prefix_9 { - padding-left: 720px; -} - -.container_12 .prefix_10 { - padding-left: 800px; -} - -.container_12 .prefix_11 { - padding-left: 880px; -} - -/* `Suffix Extra Space >> 12 Columns -----------------------------------------------------------------------------------------------------*/ - -.container_12 .suffix_1 { - padding-right: 80px; -} - -.container_12 .suffix_2 { - padding-right: 160px; -} - -.container_12 .suffix_3 { - padding-right: 240px; -} - -.container_12 .suffix_4 { - padding-right: 320px; -} - -.container_12 .suffix_5 { - padding-right: 400px; -} - -.container_12 .suffix_6 { - padding-right: 480px; -} - -.container_12 .suffix_7 { - padding-right: 560px; -} - -.container_12 .suffix_8 { - padding-right: 640px; -} - -.container_12 .suffix_9 { - padding-right: 720px; -} - -.container_12 .suffix_10 { - padding-right: 800px; -} - -.container_12 .suffix_11 { - padding-right: 880px; -} - -/* `Push Space >> 12 Columns -----------------------------------------------------------------------------------------------------*/ - -.container_12 .push_1 { - left: 80px; -} - -.container_12 .push_2 { - left: 160px; -} - -.container_12 .push_3 { - left: 240px; -} - -.container_12 .push_4 { - left: 320px; -} - -.container_12 .push_5 { - left: 400px; -} - -.container_12 .push_6 { - left: 480px; -} - -.container_12 .push_7 { - left: 560px; -} - -.container_12 .push_8 { - left: 640px; -} - -.container_12 .push_9 { - left: 720px; -} - -.container_12 .push_10 { - left: 800px; -} - -.container_12 .push_11 { - left: 880px; -} - -/* `Pull Space >> 12 Columns -----------------------------------------------------------------------------------------------------*/ - -.container_12 .pull_1 { - left: -80px; -} - -.container_12 .pull_2 { - left: -160px; -} - -.container_12 .pull_3 { - left: -240px; -} - -.container_12 .pull_4 { - left: -320px; -} - -.container_12 .pull_5 { - left: -400px; -} - -.container_12 .pull_6 { - left: -480px; -} - -.container_12 .pull_7 { - left: -560px; -} - -.container_12 .pull_8 { - left: -640px; -} - -.container_12 .pull_9 { - left: -720px; -} - -.container_12 .pull_10 { - left: -800px; -} - -.container_12 .pull_11 { - left: -880px; -} - -/* `Clear Floated Elements -----------------------------------------------------------------------------------------------------*/ - -/* http://sonspring.com/journal/clearing-floats */ - -.clear { - clear: both; - display: block; - overflow: hidden; - visibility: hidden; - width: 0; - height: 0; -} - -/* http://www.yuiblog.com/blog/2010/09/27/clearfix-reloaded-overflowhidden-demystified */ - -.clearfix:before, -.clearfix:after, -.container_12:before, -.container_12:after { - content: '.'; - display: block; - overflow: hidden; - visibility: hidden; - font-size: 0; - line-height: 0; - width: 0; - height: 0; -} - -.clearfix:after, -.container_12:after { - clear: both; -} - -/* - The following zoom:1 rule is specifically for IE6 + IE7. - Move to separate stylesheet if invalid CSS is a problem. -*/ - -.clearfix, -.container_12 { - zoom: 1; -} \ No newline at end of file diff --git a/CNAME b/CNAME deleted file mode 100644 index ca6b391f..00000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -phantomjs.org diff --git a/api/child_process.html b/api/child_process.html deleted file mode 100644 index 5bdc0b6d..00000000 --- a/api/child_process.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/api/examples.html b/api/examples.html deleted file mode 100644 index 2f0d7635..00000000 --- a/api/examples.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/api/fs.html b/api/fs.html deleted file mode 100644 index 6f45e81c..00000000 --- a/api/fs.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/api/index.html b/api/index.html deleted file mode 100644 index 7db49a4b..00000000 --- a/api/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/api/phantom.html b/api/phantom.html deleted file mode 100644 index d1713f88..00000000 --- a/api/phantom.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/api/system.html b/api/system.html deleted file mode 100644 index cbe72a15..00000000 --- a/api/system.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/api/webpage.html b/api/webpage.html deleted file mode 100644 index 5d61db8a..00000000 --- a/api/webpage.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/api/webserver.html b/api/webserver.html deleted file mode 100644 index ea79ca31..00000000 --- a/api/webserver.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/build.html b/build.html deleted file mode 100755 index 6a07393f..00000000 --- a/build.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - PhantomJS: Build Instructions - - - - - - - - - - -
- - -
-
-

Build Instructions

-
-
-
- -
- -
- -

Warning: Compiling PhantomJS from source takes a long time, mainly due to thousands of files in the WebKit module. With 4 parallel compile jobs on a modern machine, the entire process takes roughly 30 minutes. It is highly recommended to download and install the ready-made binary package if it is available.

- -

Mac OS X

- -

Install Xcode and the necessary SDK for development (gcc, various tools, libraries, etc).

- -
-git clone git://github.com/ariya/phantomjs.git
-cd phantomjs
-git checkout 1.9
-./build.sh
-
- -

This produces a static build bin/phantomjs. This is a self-contained executable, it can be moved to a different directory or another machine.

- -

Linux

- -

For Ubuntu Linux (tested on a barebone install of Ubuntu 10.04 Lucid Lynx, Ubuntu 11.04 Natty Narwhal, Ubuntu 12.04 Precise Pangolin):

- -
-sudo apt-get update
-sudo apt-get install build-essential chrpath git-core libssl-dev libfontconfig1-dev
-git clone git://github.com/ariya/phantomjs.git
-cd phantomjs
-git checkout 1.9
-./build.sh
-
- -

For Amazon EC2 AMI (release 2011.09, 2012.03) and CentOS/RHEL 6:

-
-sudo yum install gcc gcc-c++ make git openssl-devel freetype-devel fontconfig-devel
-git clone git://github.com/ariya/phantomjs.git
-cd phantomjs
-git checkout 1.9
-./build.sh
-
- -

Note 1: build.sh by default will launch parallel compile jobs depending on the available CPU cores, e.g. 4 jobs on a modern hyperthreaded dual-core processor. If necessary, e.g. when building on a virtual machine/server or other limited environment, reduce the jobs by passing a number, e.g ./build.sh --jobs 1 to set only one compile job at a time.

- -

Note 2: To create an RPM package (EC2 AMI, CentOS, or RHEL), make sure rpm-build package is installed and then - run the following after a successful build:

-
-cd rpm
-./mkrpm.sh phantomjs 
-
- -

Note 3: Compile time for Ubuntu 12.04 running on Amazon EC2 M1 Extra Large (m1.xlarge, 4 cores): 20 minutes, M1 Large (m1.large, 2 cores): 50 minutes, M1 Medium (m1.medium, 1 core): 100 minutes.

- -

Windows

- -

Install Microsoft Visual C++, either version 2010 or 2008 (the Express edition should work just fine).

- -

First step is to build OpenSSL static library. Go to openssl.org/source and download the source package (tested with version 1.0.1). Unpack the package to a working directory, e.g. C:\openssl. Configure and build OpenSSL:

-
-perl Configure VC-WIN32 no-asm --prefix=C:\openssl
-ms\do_ms
-nmake -f ms\nt.mak install
-
-

Get PhantomJS source code:

-
-git clone git://github.com/ariya/phantomjs.git
-cd phantomjs
-git checkout 1.9
-
- -

Edit file src\qt\preconfig.cmd and change OPEN_SSL_DIR variable to point to the OpenSSL working directory.

- -

Finally, compile PhantomJS:

-
-cd src\qt
-preconfig.cmd
-cd ..\..
-src\qt\bin\qmake -r
-nmake
-
- -

This produces a static build bin/phantomjs.exe. This is a self-contained executable, it can be moved to a different directory or another machine.

- - -
-
- - - - diff --git a/contributing.html b/contributing.html deleted file mode 100755 index 4bce232e..00000000 --- a/contributing.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - PhantomJS: Contribution Guide - - - - - - - - - - - -
- - -
-
-

Contribution Guide

-
-
-
- -
- -
- -

The content of this page is moved to Contributing Guide.

- -
-
- - - - diff --git a/download.html b/download.html deleted file mode 100755 index 650a857c..00000000 --- a/download.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - PhantomJS: Download and Install - - - - - - - - - - -
- - -
-
-

Download

-
-
-
- -
- -
-

Note Binary packages are made available on a volunteer basis. There is no need to - ask when a binary package for a given platform will be ready. The packagers are fully aware of every source release and they give their best effort to make the binaries available.

- -

Download service is kindly provided by Google Code Project Hosting.

- -

Windows

-

Download phantomjs-1.9.2-windows.zip (6.8 MB) and extract (unzip) the content.

-

The executable phantomjs.exe is ready to use.

-

Note: For this static build, the binary is self-contained with no external dependency. It will run on a fresh install of Windows XP or later versions. There is no requirement to install Qt, WebKit, or any other libraries.

- -

Mac OS X

-

Download phantomjs-1.9.2-macosx.zip (9.1 MB) and extract (unzip) the content.

-

The binary bin/phantomjs is ready to use.

-

Note: For this static build, the binary is self-contained with no external dependency. It will run on a fresh install of Snow Leopard or later versions. There is no requirement to install Qt or any other libraries.

-

Alternative installation using Homebrew:

-
brew update && brew install phantomjs
-

Warning: MacPorts does not have updated PhantomJS build yet. Installing via MacPorts is not recommended.

- -

Linux

-

For 64-bit system, download phantomjs-1.9.2-linux-x86_64.tar.bz2 (12.7 MB).

-

For 32-bit system, download phantomjs-1.9.2-linux-i686.tar.bz2 (13.0 MB).

- -

This package is built on CentOS 5.8. It should run successfully on Lucid or more modern systems (including other distributions). There is no requirement to install Qt, WebKit, or any other libraries. It is however expected that some base libraries necessary for rendering (FreeType, Fontconfig) and the basic font files are available in the system.

-

For older systems, please compile PhantomJS from source (see below).

- -

Source Code

-

Download phantomjs-1.9.2-source.zip (39 MB) and follow the build instructions.

-
- -
- - - - diff --git a/faq.html b/faq.html deleted file mode 100755 index 3f0b9e4d..00000000 --- a/faq.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - PhantomJS: FAQ - - - - - - - - - - -
- - -
-
-

FAQ

-
-
-
- -
- -
- -

Q: Why there is no binary package or installer for <insert your - favorite OS>?

- -

A: Binary packages, executables, and installer are provided on a volunteer basis. - They may appear later, or they may not exist at all. We are a very small team and we - can't afford to produce all possible combinations of packages for the different - platforms and operating systems out there.

- -

Q: Why does building PhantomJS take a long time?

- -

A: Because PhantomJS build workflow bundles the WebKit module, it needs to compile - thousands of source files. Using the binary package is highly recommended. - It is fast to download and easy to install.

- -

Q: Can you give a time estimate of the availability of feature X?

- -

Because nobody is working full time on PhantomJS, there is no way to - predict the exact timing of the completion of a particular feature. - Every contributor to PhantomJS works on his own pace, sometimes it can - take a few release cycles until a certain feature is shipped.

- -

Q: Is there any update on issue XYZ??

- -

Any progress related to an issue, whether it is a change in the plan - or an implementation check-in, will be always posted to the issue - page. This is part of PhantomJS contribution guide, it is essential to - the development workflow. If an issue hasn't received any new update - for a while, a question like "Is there any update?" has an obvious - answer.

- -

Q: Why do I get build failure with PhantomJS 1.5 after successfully - compiled 1.4?

- -

A: PhantomJS has a completely different build workflow in version 1.5 compared to - its previous versions (read the details). If the working directory still has some left-over -from 1.4 build process, there will be a compile error, such as:

- -
phantom.cpp:305: error: no matching function for call to 'QWebFrame::evaluateJavaScript(QString, QString)
- -

The solution is to completely clean the directory from old build files. The - recommended way is to run git clean -xfd from the top-level. - Warning: this will remove everything not stored in the Git - repository database (read Git documentation for more info). Please back-up any files - appropriately.

- -

After that, run the build script again.

- -

Q: Why do I get the error message phantomjs: cannot connect to X - server?

- -

A: In PhantomJS 1.4 or earlier, X server is still needed. The workaround is to use Xvfb. - Starting with PhantomJS 1.5, it is pure headless and there is no need to - run X11/Xvfb anymore.

- -

Q: Which WebKit version is used by PhantomJS?

- -

A: If you want to know HTML5/CSS3/other features supported by PhantomJS, using - WebKit version is not a good idea. See Supported Features wiki page for - details.

- -

If you really like to get the WebKit version, find it via the user agent, run the - examples/useragent.js. The actual version depends on the libraries with - which PhantomJS was compiled.

- -

Q: Why is PhantomJS not written as Node.js module?

- -

A: The short answer: "No one can serve two masters."

- -

A longer explanation is as follows.

- -

As of now, it is technically very challenging to do so.

- -

Every Node.js module is essentially "a slave" to the core of Node.js, i.e. "the - master". In its current state, PhantomJS (and its included WebKit) needs to have the - full control (in a synchronous matter) over everything: event loop, network stack, - and JavaScript execution.

- -

If the intention is just about using PhantomJS right from a script running within - Node.js, such a "loose binding" can be achieved by launching a PhantomJS process and - interact with it.

- -

Q: When using render(), why is the background - transparent?

- -

A: PhantomJS does not set the background color of the web page at all, it is left - to the page to decide its background color. If the page does not set anything, then - it remains transparent.

- -

To set an initial background color for a web page, use the following trick:

- -
-page.evaluate(function() {
-    document.body.bgColor = 'white';
-});
- -
-
- - - - - diff --git a/favicon.ico b/favicon.ico deleted file mode 100644 index b7d71f95..00000000 Binary files a/favicon.ico and /dev/null differ diff --git a/images/bg.gif b/images/bg.gif deleted file mode 100755 index 0d31e4bc..00000000 Binary files a/images/bg.gif and /dev/null differ diff --git a/images/bg.jpg b/images/bg.jpg deleted file mode 100755 index ad11e93d..00000000 Binary files a/images/bg.jpg and /dev/null differ diff --git a/images/blue-bar.gif b/images/blue-bar.gif deleted file mode 100755 index e87ff79c..00000000 Binary files a/images/blue-bar.gif and /dev/null differ diff --git a/images/blue-bar.jpg b/images/blue-bar.jpg deleted file mode 100755 index 28a76aee..00000000 Binary files a/images/blue-bar.jpg and /dev/null differ diff --git a/images/blue-bar.png b/images/blue-bar.png deleted file mode 100755 index 9ee3e796..00000000 Binary files a/images/blue-bar.png and /dev/null differ diff --git a/images/check.gif b/images/check.gif deleted file mode 100755 index 602a64d2..00000000 Binary files a/images/check.gif and /dev/null differ diff --git a/images/github.png b/images/github.png deleted file mode 100644 index b2c32709..00000000 Binary files a/images/github.png and /dev/null differ diff --git a/images/gray-border.png b/images/gray-border.png deleted file mode 100755 index cb9b094d..00000000 Binary files a/images/gray-border.png and /dev/null differ diff --git a/images/green-button.png b/images/green-button.png deleted file mode 100755 index 22d829bf..00000000 Binary files a/images/green-button.png and /dev/null differ diff --git a/images/header-bg.gif b/images/header-bg.gif deleted file mode 100755 index 15d25bcc..00000000 Binary files a/images/header-bg.gif and /dev/null differ diff --git a/images/icon-bugs.png b/images/icon-bugs.png deleted file mode 100644 index b1f53345..00000000 Binary files a/images/icon-bugs.png and /dev/null differ diff --git a/images/icon-ml.png b/images/icon-ml.png deleted file mode 100644 index fd8757c4..00000000 Binary files a/images/icon-ml.png and /dev/null differ diff --git a/images/icon-release.png b/images/icon-release.png deleted file mode 100644 index ee51277d..00000000 Binary files a/images/icon-release.png and /dev/null differ diff --git a/images/logo.png b/images/logo.png deleted file mode 100755 index 8f2298e4..00000000 Binary files a/images/logo.png and /dev/null differ diff --git a/images/main-bg.gif b/images/main-bg.gif deleted file mode 100755 index fd581ac9..00000000 Binary files a/images/main-bg.gif and /dev/null differ diff --git a/images/main-bottom.gif b/images/main-bottom.gif deleted file mode 100755 index 80a4e9ee..00000000 Binary files a/images/main-bottom.gif and /dev/null differ diff --git a/images/masthead-bg.gif b/images/masthead-bg.gif deleted file mode 100755 index b91e0893..00000000 Binary files a/images/masthead-bg.gif and /dev/null differ diff --git a/images/phantomjs-logo.png b/images/phantomjs-logo.png deleted file mode 100644 index fe7bc6b1..00000000 Binary files a/images/phantomjs-logo.png and /dev/null differ diff --git a/images/rasterize.png b/images/rasterize.png deleted file mode 100644 index 0c9a72b0..00000000 Binary files a/images/rasterize.png and /dev/null differ diff --git a/images/twitter.png b/images/twitter.png deleted file mode 100644 index 0417f650..00000000 Binary files a/images/twitter.png and /dev/null differ diff --git a/images/white-border.png b/images/white-border.png deleted file mode 100755 index 87a10f4d..00000000 Binary files a/images/white-border.png and /dev/null differ diff --git a/js/prettify.js b/js/prettify.js deleted file mode 100644 index eef5ad7e..00000000 --- a/js/prettify.js +++ /dev/null @@ -1,28 +0,0 @@ -var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; -(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= -[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), -l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, -q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, -q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, -"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), -a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} -for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], -"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], -H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], -J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ -I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), -["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", -/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), -["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", -hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= -!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p - - - - - - - PhantomJS 1.1 Release Notes - - - - - - - - - - -
- - -
-
-

PhantomJS 1.1 Release Notes

-
-
-
- -
- -
- -

PhantomJS 1.1, Cherry Blossom, was released on April 27, 2011. This release is a minor update and all existing scripts should still work.

- -

Some highlights of this release:

- -
    -
  • Support for file upload, network proxy, disk cache, and GIF rasterization output -
  • Scripts can be written in CoffeeScript -
  • Another implementation of PhantomJS using Python (via PyQt) -
- -The complete changes are as follows. - -

Bug fixes:

- -
    -
  • Fixed the script loading to use UTF-8 encoding -
  • Fixed building with Cygwin and Qt 4.5 -
  • Fixed issue #20 : problem with JPG transparent color -
  • Fixed issue #9 : ignore first line starting with #! -
  • Fixed issue #7 : support for file upload for form submission -
  • Fixed issue #35 : support for disabling images loading -
  • Fixed issue #14 : enable or disable plugins -
  • Fixed issue #19 : option for setting the proxy -
  • Fixed issue #17 : Specify paper size for PDF export -
  • Fixed issue #60 : Win32 and OS/2 icon files -
  • Fixed issue #93 : Build with Qt < 4.7 -
- -

New features:

- -
    -
  • Added check for system proxy setting
  • -
  • Added support for rasterizing as GIF image
  • -
  • Added support for CoffeeScript
  • Python implementation using PyQt -
  • Added clipping rectangle to the render function
  • -
  • Added command line option to use disk cache
  • -
- -

Examples:

- -
  • Added a new example: driver for QUnit tests
  • Added a new example: using Canvas to produce the color wheel
  • Added an example on sychronous waiting
  • Added text extracting example
  • Ported all examples to CoffeeScript
- -

Back to all releases.

- -
-
- - - - diff --git a/release-1.2.html b/release-1.2.html deleted file mode 100755 index 7caf3677..00000000 --- a/release-1.2.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - - - PhantomJS 1.2 Release Notes - - - - - - - - - - -
- - -
-
-

PhantomJS 1.2 Release Notes

-
-
-
- -
- -
- -

PhantomJS 1.2, Birds of Paradise, was released on June 21, 2011. It is a major update, it introduces a whole set of new API. It is not compatible with the previous version. For porting existing scripts into the new API, follow the description below.

- -

WebPage object

- -

In order to improve the security aspect (see issue 41), PhantomJS scripts will not run in the context of web page execution. This means, there is no way for malicious scripts to detect the presence of 'phantom' object and exploits its API. - -

The "sandboxing" is achieved via a new WebPage object. It is an encapsulation of a web page. A specific URL can be loaded using its open() function. A typical usage is:

- -
-var page = new WebPage();
-
-page.open(url, function (status) {
-  // do something
-});
-
- -

The callback in the open() is executed when the page loading is completed, with status equals to "success" if there is no error and "failed" is error has occurred.

- -

The above construct is a convenient version of the following:

- -
-var page = new WebPage();
-
-page.onLoadFinished = function (status) {
-  // do something
-};
-
-page.open(url);
-
- -

Beside onLoadFinished, there is also onLoadStarted which is invoked when page loading starts for the first time:

- -
-var page = new WebPage();
-
-page.onLoadStarted = function () {
-    console.log('Start loading...');
-};
-
-page.onLoadFinished = function (status) {
-    console.log('Loading finished.');
-};
-
-page.open(url);
-
- -

Page settings

- -

The behavior of the web page can be set via its settings object, with the following properties:

- -
    -
  • loadImages defines whether to load inline images or not (default to true) -
  • loadPlugins defines whether to load plugins (Flash, Silverlight, ...) or not (default to false) -
  • userAgent defines the user agent string passed to the server -
- -

As an example, here is how to change the user agent:

- -
-var page = new WebPage();
-
-page.settings.userAgent = 'Dragonless Phantom';
-
-page.open(url, function (status) {
-  // do something
-});
-
- -

Rasterization

- -

A web page can be rasterized to an image or a PDF file using render() function.

- -

This rasterize.js is all it takes to capture a web site.

- -
-var page = new WebPage(),
-    address, output, size;
-
-if (phantom.args.length < 2 || phantom.args.length > 3) {
-    console.log('Usage: rasterize.js URL filename');
-    phantom.exit();
-} else {
-    address = phantom.args[0];
-    output = phantom.args[1];
-    page.viewportSize = { width: 600, height: 600 };
-    page.open(address, function (status) {
-        if (status !== 'success') {
-            console.log('Unable to load the address!');
-        } else {
-            window.setTimeout(function () {
-                page.render(output);
-                phantom.exit();
-            }, 200);
-        }
-    });
-}
-
- -

Network traffic

- -

All the resource requests and responses can be sniffed using the onResourceRequested and onResourceReceived. An example to dump everything is:

- -
-var page = new WebPage();
-page.onResourceRequested = function (request) {
-    console.log('Request ' + JSON.stringify(request, undefined, 4));
-};
-page.onResourceReceived = function (response) {
-    console.log('Receive ' + JSON.stringify(response, undefined, 4));
-};
-page.open(url);
-
- -

The included examples/netsniff.js shows how to capture and process all the resource requests and responses and export the result in HAR format.

- -

The following shows the waterfall diagram obtained from BBC website:

- -

- -

JavaScript evaluation

- -

To evaluate JavaScript code in the context of the web page, use evaluate() function. The execution is sandboxed, there is no way for the code to access any JavaScript objects and variables outside its own page context. An object can be returned from evaluate(), however it is limited to simple objects and can't contain functions or closures.

- -

Here is an example to show the title of a web page:

- -
-var page = new WebPage();
-page.open(url, function (status) {
-    var title = page.evaluate(function () {
-        return document.title;
-    });
-    console.log('Page title is ' + title);
-});
-
- -

Any console message from a web page, including from the code inside evaluate(), will not be displayed by default. To override this behavior, use the onConsoleMessage callback. The previous example can be rewritten to:

- -
-var page = new WebPage();
-page.onConsoleMessage = function (msg) {
-    console.log('Page title is ' + msg);
-};
-page.open(url, function (status) {
-    page.evaluate(function () {
-        console.log(document.title);
-    });
-});
-
- -

To inject external code, use injectJs function passing the file name containing the code to be loaded. If the file can not be found in the current directory, it will be searched in the path specified in the libraryPath property. Both phantom and WebPage object have injectJs function.

- -

To load external JavaScript library, includeJs is very useful. It behaves like the well-known dynamic script loading technique. An example:

- -
-page.includeJs("http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", function() {
-    // jQuery is loaded, now manipulate the DOM
-});
-
- -

Bug fixes

- -
    -
  • Fixed rendering a very large web page (issue 54) -
  • Fixed reporting of CoffeeScript compile error (issue 125) -
- -

New features

- -
    -
  • Added callback for console message (issue 12) -
  • Improved security model via WebPage object (issue 41) -
  • Added support for POST, HEAD, PUT, and DELETE (issue 88) -
  • Scripts filename is now passed as phantom.scriptName -
  • Added callback to capture resource requests and responses (issue 2) -
  • Added the ability to load external JavaScript (issue 32) -
- -

Examples

- -
    -
  • Ported examples to use WebPage object -
  • Added a new example to upload an image to imagebin.org -
  • Added a new example to show HTTP POST feature -
  • Added a new example to sniff network traffic and save it in HAR format -
- - -

Back to all releases.

- -
-
- - - - diff --git a/release-1.3.html b/release-1.3.html deleted file mode 100755 index 2a634251..00000000 --- a/release-1.3.html +++ /dev/null @@ -1,355 +0,0 @@ - - - - - - - - PhantomJS 1.3 Release Notes - - - - - - - - - - -
- - -
-
-

PhantomJS 1.3 Release Notes

-
-
-
- -
- -
- -

PhantomJS 1.3, Water Lily, was released on September 23, 2011. It is a minor update, mostly bug fixes and few additional new features.

- -

This version is backward compatible with version 1.2. Existing scripts should work without any modification.

- -

Minimum requirement to build PhantomJS 1.3 is Qt 4.6 or later. Latest stable release of Qt, i.e. version 4.7.4, is strongly recommended.

- -

Initial module support

- -

Module API modelled after CommonJS Modules is available, currently only supporting webpage and fs built-in modules.

- -

For compatibility reason, WebPage object at the global scope is still available. It will be deprecated in some future release. The new recommended way to create a web page is as follows:

- -
-var page = require('webpage').create();
-
-page.open(url, function (status) {
-  // do something
-});
-
- -

WebPage object improvement

- -

WebPage object wraps a native object that represents the web page. Because of technical limitation, a WebPage object can not be properly garbage collected and freed from the memory. To prevent increasing heap usage when create a lot of WebPage objects, use the new release() function, as in this example:

- -
-var page = require('webpage').create();
-
-page.open(url, function (status) {
-  // do something
-  // ....
-  // finish
-  page.release();
-});
-
- -

A new callback onInitialized can be used to modify the global objects before a page is loaded. In the following example, further calls to Math.random() effectively will always return the specified constant.

- -
-page.onInitialized = function() {
-    Math.random = function() {
-        return 42;
-    };
-};
-
- -

Related to page rasterization using render() function, it is now possible to control the physical scroll offset of the web page using the new property of WebPage called scrollPosition, as illustrated below: - -

-page.scrollPosition = { top: 100, left: 0 };
-page.render('output.png');
-
- -

There is now a convenient way to create a new page by passing an option the constructor: - -

-var page = new WebPage({
-  onConsoleMessage: function (msg) {
-    console.log(msg);
-  },
-
-  settings: {
-    loadPlugins: false,
-    userAgent: 'Dragonless Phantom'
-  },
-
-  viewportSize: {
-    width: 800,
-    height: 600
-  }
-});
-
- -

Page settings

- -

The behavior of the web page can be further modified by the following new settings:

- -
    -
  • javascriptEnabled defines whether to execute the script in the page or not (default to true) -
  • XSSAuditingEnabled defines whether load requests should be monitored for cross-site scripting attempts (default to false) -
  • localToRemoteUrlAccessEnabled defines whether local resource (e.g. from file) can access remote URLs or not (default to false) -
  • userName sets the user name used for HTTP authentication -
  • password sets the password used for HTTP authentication -
- -

Example usage:

- -
-var page = new WebPage();
-
-page.settings.javascriptEnabled = true;
-page.settings.XSSAuditingEnabled = true;
-page.settings.localToRemoteUrlAccessEnabled = true;
-
-page.open(url, function (status) {
-  // do something
-});
-
- -

Mouse events

- -

Mouse events can be sent to the page using the new sendEvent function, like in the following examples:

- -
-page.sendEvent('mousedown', 45, 50);
-
- -

The first argument is the event type. Other available types are mouseup, mousemove, and click. The next two arguments represents the mouse position.

- -

As of now, left button is the only pressed button for the event. For mousemove however, there is no button pressed (i.e. it is not dragging).

- -

The events are not like synthetic DOM events. Each event is sent to the web page as if it comes as part of user interaction.

- -

File system access

- -

A set of API functions is available to access files and directories. They are modelled after CommonJS Filesystem proposal. - -

To start using, it needs to be instantiated via the fs module such as: - -

-var fs = require('fs');
-
- -

Read-only properties:

- -
    -
  • separator is the path separator (forward slash or backslash, depending on the operating system). -
  • workingDirectory is the current working directory. -
- -

Query functions:

- -
    -
  • list(path) returns the list of all the names of all the files in a specified path. -
  • absolute(path) returns the absolute path starting from the root file system, resolved from the current working directory. -
  • exists(path) returns true if a file or a directory exists. -
  • isDirectory(path) returns true if the specified path is a directory. -
  • isFile(path) returns true if the specified path is a file. -
  • isAbsolute(path) returns true if the specified path is an absolute path. -
  • isExecutable(path) returns true if the specified file can be executed. -
  • isReadable(path) returns true if a file or a directory is readable. -
  • isWritable(path) returns true if a file or a directory is writeable. -
  • isLink(path) returns true if the specified path is a symbolic link. -
- -

Directory-related functions:

- -
    -
  • changeWorkingDirectory(path) changes the current working directory to the specified path. -
  • makeDirectory(path) creates a new directory. -
  • makeTree(path) creates a directory including any missing parent directories. -
  • removeDirectory(path) removes a directory if it is empty -
  • removeTree(path) removes the specified path, regardless of whether it is a file or a directory. -
  • copyTree(source, destination) copies the entire files from a source path to the destination path. -
- -

File-related functions:

- -
    -
  • open(path, mode) returns a stream object representing the stream interface to the specified file (mode can be r for read, w for write, or a for append). -
  • read(path) returns the entire content of a file. -
  • write(path, content, mode) writes content to a file (mode can be w for write or a for append). -
  • size(path) returns the size (in bytes) of the file specified by the path. -
  • remove(path) removes the file specified by the path. -
  • copy(source, destination) copies a file to another. -
  • move(source, destination) movies a file to another, effectively renaming it. -
  • touch(path) touches a file (i.e. changes its access timestamp). -
- -

A stream object returned from the open() function has the following functions: - -

    -
  • read returns the content of the stream. -
  • write(data) writes the string to the stream. -
  • readLine reads only a line from the stream and return it. -
  • writeLine(data) writes the data as a line to the stream. -
  • flush() flushes all pending input output. -
  • close() completes the stream operation. -
- -

As an example of file access API, the following function recursively traverses a directory and prints all the found entries: - -

-function scanDirectory(path) {
-    var fs = require('fs');
-    if (fs.exists(path) && fs.isFile(path)) {
-        console.log(path);
-    } else if (fs.isDirectory(path)) {
-        fs.list(path).forEach(function (e) {
-            if (e !== '.' && e !== '..') {
-                scanDirectory(path + '/' + e);
-            }
-        });
-    }
-};
-
- -

Command-line options

- -

Newly available options are:

- -
    -
  • --max-disk-cache-size=size limits the size of disk cache (in KB) -
  • --output-encoding=encoding sets the encoding used for terminal output (default is utf8). -
  • --script-encoding=encoding sets the encoding used for the starting script (default is utf8). -
  • --local-to-remote-url-access=[yes|no] allows local content to access remote URL (default is no). -
  • --ignore-ssl-errors=[yes|no] ignores SSL errors, such as expired or self-signed certificate errors (default is no). -
  • --cookies-file=/path/to/cookies.txt specifies the file name to store the persistent cookies. -
- -

Rather than passing all options in the command-line, it is also possible to store the options in a file using JavaScript Object Notation (JSON) and then tell PhantomJS to read it:

- -
phantomjs --config=/path/to/config.json script.js arg1 arg2 arg3
- -

where the contents of config.json looks like:

- -
-{
-    'ignoreSslErrors': true,
-    'localToRemoteUrlAccessEnabled': true
-}
-
- -

Platform-specific

- -

Mac OS X: There is no more application bundle, the executable is bin/phantomjs and not bin/phantomjs.app/Contents/MacOS/phantomjs anymore.

- -

Bug fixes

- -
    -
  • Fixed open() and POST method, without specifying the finished handler -
  • Fixed script execution warning dialog (issue 165) -
  • Added WebPage.release() to free the web page from memory (issue 154) -
  • Added special handling of about:blank (issue 235) -
  • Made a separate network access manager for each page (issue 190) -
- -

New features

- -
    -
  • Introduced file system API based on CommonJS Filesystem proposal (issue 129) -
  • Added support for persistent cookies (issue 91) -
  • Added event handling, currently only for mouse events (issue 234) -
  • Added page scroll position (issue 162) -
  • Added HTTP authentication support (issue 45) -
  • Added callback for page initialization (issue 143) -
  • Added support to specify script and output encoding (issue 186) -
  • Added option to allow local content to do cross-domain access (issue 28) -
  • Added support to apply configurations from a JSON file (issue 180) -
  • Added a convenient WebPage initialization construction (issue 206) -
  • Added option to limit the size of disk cache (issue 220) -
- -

Examples

- -
    -
  • Added a new example on using Modernizr to detect features (issue 144) -
  • Fixed pizza.js example to use Mobile Yelp (issue 200) -
  • Fixed netsniff.coffee example due to wrong indentation (issue 225) -
  • Added an example to show live network traffic (issue 227) -
  • Added an example demonstrating different output encodings (issue 186) -
- - -

Back to all releases.

- -
-
- - - - diff --git a/release-1.4.html b/release-1.4.html deleted file mode 100755 index 573e9704..00000000 --- a/release-1.4.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - PhantomJS 1.4 Release Notes - - - - - - - - - - -
- - -
-
-

PhantomJS 1.4 Release Notes

-
-
-
- -
- -
- -

PhantomJS 1.4, Glory of the Snow, was released on December 22, 2011. It is a minor update, mostly bug fixes and one new major feature: WebServer module.

- -

This version is backward compatible with version 1.3. Existing scripts should work without any modification.

- -

Minimum requirement to build PhantomJS 1.3 is Qt 4.6 or later. Latest stable release of Qt, i.e. version 4.8.0, is strongly recommended.

- -

WebServer module

- -

Note: This WebServer module is intended for ease of communication between PhantomJS scripts and the outside world. It is not recommended to use it as a general production server.

- -

By using the embedded web server module Mongoose, PhantomJS script can start a web server which listens to a particular port.

- -

A very simple example is as follows. It always gives the same response for any request.

- -
var server, service;
-
-server = require('webserver').create();
-
-service = server.listen(8080, function (request, response) {
-    response.statusCode = 200;
-    response.write('Hello!');
-});
-
- -

The request object passed to the callback function may contain the following properties:

- -
    -
  • method defines the request method (GET, POST, ...) -
  • url contains the complete request URL, including the query string (if any) -
  • httpVersion has the actual HTTP version -
  • headers stores all HTTP headers as key-value pair -
- -

The response object should be used to create the response:

- -
    -
  • statusCode sets the returned status code -
  • write sends a chunk for the response body (it can be called multiple times). -
- -

This WebServer module is still rather simple in this version. Depending on the needs, the functionalities and the corresponding API will be expanded in the next versions.

- -

Static version build script

- -

For continuous integration server and various other uses cases, often it is desired to have a static version of PhantomJS which has almost zero dependencies. While building PhantomJS for the static build is not difficult, it is often a daunting task to figure out the bits and pieces necessary to achieve that build.

- -

For convenience, now there are two build scripts, available in the deploy subdirectories, each for Linux and Mac. The script automatically downloads the source code of Qt, build everything locally, and then prepare the binary for deployment. There is no need to have Qt installed on the system before running the script.

- -

The produced binary has very minimal dependencies and can be transferred to another machine easily. With the help of UPX (optional), the size of the binary is only about 10 MB.

- -

Note: Even with the static build, as of now you still need to setup Xvfb for the Linux version. Also for Mac, don't forget the Info.plist file (see issue 281).

- -

New features

- -
    -
  • Added embedded HTTP server (issue 115)
  • -
  • Added convenient build script for Linux (issue 197)
  • -
  • Added support for SOCKS5 proxy (issue 266)
  • -
  • Updated CoffeeScript compiler to version 1.2 (issue 312)
  • -
- -

Bug fixes

- -
    -
  • Fix potential crash in QUrl with Qt 4.8 (issue 304)
  • -
  • Fix bug in CookieJar with QSettings and string (PyPhantomJS issue 10)
  • -
  • Prevent showing the icon on Mac OS X Dock (issue 281)
  • -
- -

Examples

- -
    -
  • Added a new example to detect browsers sniffing (issue 263)
  • -
  • Added HTTP server example (issue 115)
  • -
- -

Back to all releases.

- -
-
- - - - diff --git a/release-1.5.html b/release-1.5.html deleted file mode 100755 index 2f44fade..00000000 --- a/release-1.5.html +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - - - PhantomJS 1.5 Release Notes - - - - - - - - - - -
- - -
-
-

PhantomJS 1.5 Release Notes

-
-
-
- -
- -
- -

PhantomJS 1.5, Ghost Flower, was released on March 20, 2012. This version is backward compatible with version 1.4. Existing scripts should work without any modification, unless there is a need to run Flash or other plugins (see below).

- -

PyPhantomJS, the implementation of PhantomJS in Python with PyQt, ceased the development (issue 344) and thus the code has been removed from the repository.

- -

Pure headless (no X11) on Linux

- -

While it's always possible to customize the build of PhantomJS Linux without X11 (in particular since the last 1.4 release), it's a tedious adventure. Beginning from this release, X11-less setup is the standard when building PhantomJS Linux from source.

- -

The benefits of pure headless are two-fold: no need to use Xvfb, it also compiles out-of-the-box on a barebone Linux server without GUI. This should make it easy to place PhantomJS in various continuous integration systems and cloud/elastic platforms.

- -

Note that the pure headless mode does not compromise the functionalities and rendering quality. For screen capture, text rasterization is still done through FreeType and Fontconfig. Various formats (PNG, GIF, JPEG) for inlined images are still supported. Even producing PDF from the web page works just fine.

- -

No more support for Flash and other plugins

- -

Plugin support has been completely disabled (see issue 413) for the following reasons:

- -
    -
  • Going pure headless without X11 means it is not possible to have native window handle for the plugin.
  • -
  • Flash apps should be tested by whatever tools Adobe provides to the developers.
  • -
  • Issues are reported but nobody volunteers to analyze or fix them.
  • -
- -

Future reported issues and bugs which relate to Flash and other plugins will be marked as WontFix.

- -

Improved troubleshooting

- -

To facilitates easier troubleshooting, there exists support for interactive mode (REPL), remote debugging, and error handling.

- -

If PhantomJS is launched without any argument, it starts in the so-called interactive mode, also known for REPL (read-eval-print-loop). This mode allows a faster cycle of experiment and script prototyping. PhantomJS REPL supports the expected features: command editing, persistent history, and autocomplete (with Tab key).

- -

Terminal line editing feature of this interactive mode is based on Linenoise (an improved fork of the original project).

- -

Remote debugging permits inspection of the script and web page via another WebKit-based browser (Safari and Chrome). This is achieved by launching PhantomJS with the new option, as in this example

- -
phantomjs --remote-debugger-port=9000 test.js
- -

After than, open Safari/Chrome and go to the http://ipaddress:9000. The browser will show the familiar Web Inspector interface which in this case works on the script being tested.

- -

Note: As of now, remote debugging is only for Linux (see issue 430) .

- -

To easily catch an error occured in a web page, whether it is a syntax error or other thrown exception, an onError handler for the WebPage object has been added. An example on such a handler is:

- -
-page.onError = function (msg, trace) {
-    console.log(msg);
-    trace.forEach(function(item) {
-        console.log('  ', item.file, ':', item.line);
-    })
-}
-
- -

Now if the page opens a site with some JavaScript? exceptions, a detailed information (including the stack trace) will be printed out.

- -

Note: Further refinement to the stack trace is still being planned (see issue 166).

- -

System module

- -

A set of functions to access system-level functionalities is available, modelled after CommonJS System proposal.

- -

To start using, it needs to be instantiated via the system module such as:

- -
var system = require('system');
- -

Read-only properties:

- -
    -
  • platform is the name of the platform, always fixed as phantomjs. -
- -

Query functions: - -

    -
  • env returns the list (as key value pair) of the environment variables. -
  • args returns the list of command-line arguments. The first one is always the script name, it is followed by the subsequent arguments. -
- -

An example printenv.js demonstrates the same functionality as in the Unix printenv utility:

- -
-var system = require('system'),
-    env = system.env,
-    key;
-
-for (key in env) {
-    if (env.hasOwnProperty(key)) {
-        console.log(key + '=' + env[key]);
-    }
-}
-phantom.exit();
-
- -

An example arguments.js prints all the command-line arguments:

- -
-var system = require('system');
-if (system.args.length === 1) {
-    console.log('Try to pass some args when invoking this script!');
-} else {
-    system.args.forEach(function (arg, i) {
-            console.log(i + ': ' + arg);
-    });
-}
-phantom.exit();
-
- -

If the script is invoked:

- -
phantomjs arguments.js answer 42
- -

gives the following result: - -

-0: arguments.js
-1: answer
-2: 42
-
- -

Control web security

- -

Performing cross-domain XHR is often necessary for some scripting purposes. This is now possible by disabling web security (issue 28), either with --web-security=no command-line option or webSecurityEnabled page setting.

- -

Note: Disabling web security may make the system more vulnerable to attacks and other malicious content. Use it with great caution. - -

An example findads.js uses disabled web security to access the frame content from Google Ads server: https://gist.github.com/2037945. - -

New features

- -
    -
  • Added interactive mode, also known as REPL (issue 252) -
  • Added setting for web security, to allow cross domain XHR (issue 28) -
  • Added error handler for WebPage object (issue 166) -
  • Removed X11/Xlib requirement on Linux (issue 163) -
  • Added support for custom HTTP header in the network request (issue 77) -
  • Added support for read write encoding in the file system module (issue 367) -
  • Added remote debugging support on Linux (issue 6) -
  • Added support for proxy authentication (issue 105) -
  • Added System module, to retrieve environment variables (issue 271) and arguments (issue 276) -
  • Added fs.readLink function (issue 329) -
  • Added support for reading and writing binary data (issue 400) -
  • Added support to retrieve request data in the WebServer? module (issue 340) -
  • Added support for individual top/bottom/left/right print margins (issue 388) -
  • Added command-line option --help (issue 347) -
  • Added short command-line options -v and -h (issue 408) -
  • Removed support for Flash and other plugins (issue 418) -
- -

Bug fixes

- -
    -
  • Fixed multiple console.log arguments (issue 36) -
  • Fixed file upload (issue 307) -
  • Fixed the web server instance to be asynchronous (issue 326) and still support Keep Alive (issue 416) -
  • Workaround Qt 4.8.0 crash due to empty URL scheme (issue 365) -
  • Fixed a Content-Type problem where POST does not work (issue 337) -
  • Fixed Jasmine test runner with Jasmine 1.1 (issue 402) -
  • Don't display debugging and warning messages (issue 323) -
- -

Back to all releases.

- -
-
- - - - diff --git a/release-1.6.html b/release-1.6.html deleted file mode 100755 index 43be2144..00000000 --- a/release-1.6.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - PhantomJS 1.6 Release Notes - - - - - - - - - - -
- - -
-
-

PhantomJS 1.6 Release Notes

-
-
-
- -
- -
- -

PhantomJS 1.6, Lavender, was released on June 20, 2012. It is a minor update, mostly bug fixes and some new API.

- -

This version is backward compatible with version 1.5. Existing scripts should work without any modification.

- -

Improved support for rendering

- -

While it is always possible to capture the web page and render it as an image, it involves creating an external file to hold that image. With this version, the captured content can be retrieved as a string, base64-encoded using the new renderBase64(format) function.

- -

The example will dump the base64-encoded rendering of the web page in PNG format (the default if no format is specified) to the terminal:

- -
-var page = require('webpage').create();
-page.open('http://m.bing.com', function (status) {
-    console.log(page.renderBase64());
-    phantom.exit();
-});
-
- -

To facilitate creating thumbnail preview, scaling the screen capture is now possible via the new zoomFactor property. In this example, the BBC site is captured to an image at 25% zoom.

- -
-var page = require('webpage').create();
-page.open('http://news.bbc.co.uk', function (status) {
-    page.zoomFactor = 0.25;
-    page.render('bbc.png');
-    phantom.exit();
-});
-
- -

Better script evaluation

- -

Arguments can be passed to evaluate() function to run a script in the context of the web page.

- -

In the following example, the text value of a DOM element is extracted. The element is chosen based on the selector which is passed to evaluate.

- -
-var page = require('webpage').create();
-page.open('http://m.bing.com', function (status) {
-    var title = page.evaluate(function (s) {
-        return document.querySelector(s).innerText;
-    }, 'title');
-    console.log(title);
-    phantom.exit();
-});
-
- -

Evaluating a script asynchronously is now possible via the new evaluateAsync function. Unlike the standard evaluate, the function returns immediately and does not wait until the script execution finishes. Consequently there is no return value from this function.

- -

New features

- -
    -
  • Added support for passing arguments to WebPage's evaluate (issue 132) -
  • Added callbacks for JavaScript onConfirm and onPrompt (issue 133) -
  • Added stack trace when error occurs (issue 166) -
  • Added initial support for cookies handling (issue 354) -
  • Added support for header footer when printing the page (issue 410, 512) -
  • Added headers support in the loading request (issue 452) -
  • Added support to render the web page as base64-encoded string (issue 547) -
  • Added hooks for navigation event (issue 562) -
  • Added command-line option to show debug messages (issue 575) -
  • Added support for the zoom factor for web page rendering (issue 579) -
  • Added crash reporter for Mac OS X and Linux, based on Google Breakpad (issue 576) -
  • Added 'os' object to the system module (issue 585) -
  • Added support for asynchronous evaluation (issue 593) -
- -

Improvements

- -
    -
  • Fixed remote debugging to work on Mac OS X and Windows (issue 430) -
  • Fixed web server getting the dropped connection for empty response (issue 451) -
  • Fixed text rendered as boxes (squares) on headless Linux (issue 460) -
  • Updated Qt to version 4.8.2 (issue 495) -
  • Updated CoffeeScript compiler to version 1.3.3 (issue 496) -
  • Fixed the build script to detect and use MAKEFLAGS (issue 503) -
  • Fixed the build script to properly pass Qt config flags (issue 507) -
  • Changed Info.plist to be embedded in Mac OS X executable (issue 528) -
  • Fixed wrong module require in the imagebin example (issue 536) -
  • Fixed example scripts to exit with the right exit code (issue 544) -
  • Fixed build failure with glib 2.31.0+ (issue 559) -
  • Fixed error handler failures in some cases (issue 589) -
- - -

Back to all releases.

- -
-
- - - - diff --git a/release-1.7.html b/release-1.7.html deleted file mode 100755 index e0c7893b..00000000 --- a/release-1.7.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - PhantomJS 1.7 Release Notes - - - - - - - - - - - - - - -
- - -
-
-

PhantomJS 1.7 Release Notes

-
-
-
- -
- -
- -

PhantomJS 1.7, Blazing Star, was released on September 22, 2012. It added module system support (modelled after CommonJS), better cookies handling, additional input events, and other small improvements.

- -

Module system

- -

There has been module system support for a while, however it works only for internal modules. In this release, that support is extended for generic module written in JavaScript or CoffeeScript. The construct for the module system is modelled after CommonJS Modules 1.1.

- -

As an example, supposed there is a script universe.js which contains the following code:

- -
-exports.answer = 42;
-exports.start = function () {
-    console.log('Starting the universe....');
-}
-
- -

This module can be used in another script like the following:

- -
-var universe = require('./universe');
-universe.start();
-console.log('The answer is', universe.answer);
-
- -

With this module support, a long PhantomJS script can be broken down into smaller files and thus it becomes more maintainable.

- -

Cookies handling

- -

Support for cookies has been added in the previous version. In this release, the implementation is significantly improved in order to make it behave as similar as possible in a real web browser. The cookies are stored in a global container ("cookiejar") which can be serialized and modified easily.

- -

The following simple example shows every single cookie set when accessing a web site:

- -
-var page = require('webpage').create();
-phantom.cookiesEnabled = true;
-page.open('http://m.bing.com', function () {
-    console.log(JSON.stringify(phantom.cookies, null, 2));
-    phantom.exit();
-});
-
- -

More input events

- -

PhantomJS can send input events to a web page. This not a DOM event, it is more like a real user input in a web browser.

- -

In this version, a mouse event can now explicitly specify the button corresponding to the event: middle or right (otherwise it is left by default). In addition, doubleclick event type is also supported. The following code fragment demonstrates sending a right-click:

- -
-page.open(url, function () {
-    page.sendEvent('mousepress', 50, 100, 'right');
-});
-
- -

Beside mouse events, finally you can also trigger keyboard-related events: keyup, keydown, and keypress. For any of these events, a character or a string needs to be passed as in the following code fragment:

- -
-page.open(url, function () {
-    page.sendEvent('keypress', 'A'); // send one char
-    page.sendEvent('keypress', 'PhantomJS'); // send a sequence of characters
-});
-
- -

New features

- -
    -
  • Added a module system modelled after CommonJS/Node.js (issue 47) -
  • Added support for window pop-up (issue 151) -
  • Static build on Linux (issue 413) -
  • Added run-time detection of SSL support (issue 484) -
  • Added more events support (issue 492, 712) -
  • Added support for disabling automatic proxy detection (issue 580) -
  • Provided page closing callback (issue 678) -
  • Added methods to access URL, frames URL, frame Content (issue 758) -
  • Added more cookies-related API (issue 761) -
- -

Improvements

- -
    -
  • Refactored command-line options handling (issue 55) -
  • Improved the workflow for producing release builds (issue 599) -
  • Improved cookies API and implementation (issue 603, 761) -
  • Improved frame switching API (issue 654) -
  • Fixed iframe handling regression (issue 683) -
  • Fixed OS version number with Windows 8 and Mountain Lion (issue 684, 688) -
  • Fixed HAR navigation info in the netsniff example (issue 733) -
  • Fixed compile warnings with Visual Studio (issue 744) -
  • Removed hacks for static linking on Windows (issue 753) -
  • Added ICO image handling on Windows (issue 779) -
  • Fixed font antialiasing on Windows (issue 785) -
  • Improved Jasmine test runner for Jasmine 1.2 (issue 792) -
- -

Known Issues on Microsoft Windows

- -
    -
  • Very slow network performance. The workaround is to set proxy type to "none" (issue 580) -
  • Some graphics drivers may cause mysterious crash (issue 845) -
- -

Back to all releases.

- -
-
- - - - diff --git a/release-1.8.html b/release-1.8.html deleted file mode 100644 index 42f4c87a..00000000 --- a/release-1.8.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - - - PhantomJS 1.8 Release Notes - - - - - - - - - - - - - - -
- - -
-
-

PhantomJS 1.8 Release Notes

-
-
-
- -
- -
- -

PhantomJS 1.8, Blue Winter Rose, was released on December 21, 2012. It integrated Ghost Driver, an implementation of WebDriver Wire Protocol.

- -

WebDriver support via Ghost Driver integration

- -

- Ghost Driver, a project by - Ivan De Marino, is an implementation - of WebDriver Wire Protocol. - In this PhantomJS release, Ghost Driver functionalities have been fully integrated. -

-

- To launch PhantomJS in Remote WebDriver mode at the intended PORT number: -

phantomjs --webdriver=PORT
-

- -

- The following example, written in Ruby, assumes PhantomJS WebDriver is running on port 9134. - The script will load Google, submit a search for the term "PhantomJS" and print the page title - of the search result page: -

-require "selenium-webdriver"
-driver = Selenium::WebDriver.for(:remote, :url => "http://localhost:9134")
-driver.navigate.to "http://google.com"
-element = driver.find_element(:name, 'q')
-element.send_keys "PhantomJS"
-element.submit
-puts driver.title
-driver.quit
-

- -

- Bindings for your favourite programming language can be found in Selenium >= 2.27: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Language BindingStatus
JavaAvailable
C#/.NetAvailable
PythonAvailable
RubyAvailable
PHPWork in progress
- - NOTICE: Language bindings are provided by kind members of the Selenium community. - Issues related to those should be - reported to Selenium project. - PhantomJS solely implements the Wire Protocol and it is not responsible for any/possible - binding malfunctions. -

-

- More details can be found in - this blog post. - Also, make sure you check the documentation of Selenium WebDriver. -

- -

New features

- -
    -
  • Integrated GhostDriver as the WebDriver implementation (issue 49) -
  • Added an option to specify the SSL protocol (issue 174) -
  • Added encoding support for WebServer's response (issue 505) -
  • Added process ID (PID) to the System module (issue 769) -
  • Added properties to obtain page and frame title (issue 799) -
  • Added page navigation methods (issue 808) -
  • Added a limit for authentication attempts (issue 826) -
  • Added support for modifier keys in keyboard events (issue 835) -
  • Added onFilePicker callback for more generic file upload API (issue 843) -
  • Added the ability to set the page content and location (issue 909) -
- -

Improvements

- -
    -
  • Fixed date parsing in ISO8601 format (issue 187, 267) -
  • Fixed window.location (issue 530, 632) -
  • Deregistered multiple callback handler (issue 807) -
  • Fixed sending of double-click events (issue 848) -
  • Increases maximum number of redirects (issue 849) -
  • Fixed keycodes sent for lowercase characters (issue 852) -
  • Fixed a regression in table row page break (issue 880) -
  • Completed the CoffeeScript version of the examples (issue 907) -
  • Updated Qt to version 4.8.4 (issue 918) -
  • Fixed potential hang in some example scripts (issue 922) -
- -

Fix in 1.8.1

- -
    -
  • Mac OS X: Fix possible crash when using some TrueType fonts (issue 690) -
- -

Fixes in 1.8.2

- -
    -
  • Fixed possible PDF error due to invalid CreationDate field (issue 663) -
  • Fixed crash when uploading non existing files (issue 941) -
  • Fixed possible crash when accessing inline frames (issue 947) -
  • Extended SSL ignore setting to synchronous XHR (issue 985) -
  • Fixed incorrect date handling in the cookies (issue 1068) -
- -

Known Issues on Microsoft Windows

- -
    -
  • Very slow network performance. The workaround is to set proxy type to "none" (issue 580) -
  • Some graphics drivers may cause mysterious crash (issue 845) -
- -

Back to all releases.

- -
-
- - - - - diff --git a/release-1.9.html b/release-1.9.html deleted file mode 100644 index 1c8aacf9..00000000 --- a/release-1.9.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - PhantomJS 1.9 Release Notes - - - - - - - - - - - - - - -
- - -
-
-

PhantomJS 1.9 Release Notes

-
-
-
- -
- -
- -

PhantomJS 1.9, Sakura, was released on March 20, 2013. It came with an updated GhostDriver, -an improved resource loading control, as well as other incremental improvements.

- -

Note: PhantomJS 1.9 is the last release in the 1.x series. For the next 2.x series, the core implementation will be -ported to Qt 5 to get a more modern base platform, -as well as to have an updated WebKit module.

- -

Network requests control

- -

A new functionality is provided so that every network request can be aborted. This is quite similar to the existing -support for intercepting those requests (for monitoring purposes), except now any unwanted requests could be blocked as well. -The following code fragment demonstrate the use:

- -
-page.onResourceRequested = function(requestData, request) {
-  if ((/http:\/\/.+?\.css$/gi).test(requestData['url'])) {
-    request.abort();
-  }
-};
-
- -

If a request has an associated URL ending with .css, it will not be routed to the server. Effectively, -this means that the page is loaded without any stylesheets -(often useful to check for connection failures). Matching the URL with the main resource URL can also be used to -exclude third-party assets.

- -

Of course, the URL matching can be more complicated than these simple examples.

- -

New features

- -
    -
  • Added spawn and execFile to execute external programs (issue 10219)
  • -
  • Added the ability to abort network requests (issue 10230)
  • -
  • Added system access to stdin, stdout, and stderr (issue 10333)
  • -
  • Added support for custom CA certificates location (issue 10916)
  • -
  • Added seek function to the File stream (issue 10937)
  • -
  • Implemented file read for a specified number of bytes (issue 10938)
  • -
  • Added a callback to handle network error (issue 10954, issue 10997)
  • -
  • Added custom encoding support when opening a page (issue 11043)
  • -
  • Implemented require.stub() support for a factory function (issue 11044)
  • -
  • Added page loading indicator and progress (issue 11091)
  • -
  • Added a timeout option for network requests (issue 11129)
  • -
- -

Improvements

- -
    -
  • Fixed the build on FreeBSD (issue 10597)
  • -
  • Ensured a consistent 72 dpi for Linux headless rendering (issue 10659)
  • -
  • Fixed possible PDF error due to invalid CreationDate field (issue 10663)
  • -
  • Fixed crash when uploading non existing files (issue 10941)
  • -
  • Improved the autocomplete internal of the interactive/REPL mode (issue 10943)
  • -
  • Fixed possible crash when accessing inline frames (issue 10947)
  • -
  • Changed Linux binary package setup to be built on CentOS 5 (issue 10963)
  • -
  • Extended SSL ignore setting to synchronous XHR (issue 10985)
  • -
  • Added convenient constants for modifier keys (issue 11056)
  • -
  • Fixed incorrect date handling in the cookies (issue 11068)
  • -
  • Updated GhostDriver to version 1.0.3 (issue 11146)
  • -
- -

Examples

- -
    -
  • Fixed invalid data URI in the netsniff example (issue 10740)
  • -
  • Implemented a new weather example (issue 10794)
  • -
  • Fixed rendering issues in render_multi_url (issue 11021)
  • -
  • Fixed proper event sequence in page_events example (issue 11028)
  • -
  • Miscellanous tweaks (issue 11082)
  • -
- -

Fixes in 1.9.1

- -
    -
  • Fixed problems with specifying proxy server (issue 10811, 11117)
  • -
  • Fixed UTF-8 encoding with system.stdout and system.stderr (issue 11162)
  • -
  • Ensured that onResourceReceived will be always invoked (issue 11163)
  • -
  • Fixed module loading from an absolute path on Windows (issue 11165)
  • -
  • Fixed typo in the command-line option for setting the cache size (issue 11219)
  • -
  • Fixed possible crash when handling network requests (issue 11252, 11338)
  • -
- -

Fixes in 1.9.2

- -
    -
  • Fixed graphical artifacts with transparent background on Windows (issue 11276, 11007, 11366)
  • -
  • Updated GhostDriver to version 1.0.4 (issue 11452)
  • -
- -

Known Issues on Microsoft Windows

- -
    -
  • Very slow network performance. The workaround is to set proxy type to "none" (issue 10580)
  • -
  • Some graphics drivers may cause mysterious crash (issue 10845)
  • -
- -

Back to all releases.

- -
-
- - - - - diff --git a/release-names.html b/release-names.html deleted file mode 100755 index e6353c8a..00000000 --- a/release-names.html +++ /dev/null @@ -1,269 +0,0 @@ - - - - - - - - PhantomJS: Names of Releases - - - - - - - - - - -
- - -
-
-

Story Behind the Names

-
-
-
- -
- -
- -

PhantomJS 1.9 "Sakura"

- -

- -

Sakura is a spring flower, see Ariya's email on Mar 23, 2013:

- -
-We do agree that this release should mark the end of the 1.x series. -Going forward, we'll switch to Qt 5 and use the chance to boot the -all-new 2.0. For such a closing release, it just makes sense to pick -something related to the first code name ever given (exercise for the -reader), hence why 1.9 is called "Sakura". -
- -
- -

PhantomJS 1.8 "Blue Winter Rose"

- -

-

The Blue Winter Rose is a flower that grows in the glass gardens of Winterfell. -It's pale blue the color of frost. Also, it's connected to the legend of Bael the Bard.

- -
- Bael the Bard climbed the Wall.
- Took the Kingsroad and entered Winterfell.
- He made himself known as Sygerrik of Skagos, a singer.
- He sang until midnight for the Lord's pleasure.
- Impressed by his skills, Lord Brandon Stark asked him what rewarded he wanted.
- Bael asked for the most beautiful flower in Winterfell's gardens.
- Blue winter roses were just blooming.
- Brandon Stark agreed to offer him one.
-
- -

The following morning, the virgin daughter of the lord had disappeared. In her bed was a Blue Winter Rose.

- -

Source: A wiki of Ice and Fire.

-
-

Photo by christopher goodband CC BY-SA 2.0.

- -

PhantomJS 1.7 "Blazing Star"

- -

- -

Blazing Star is an autumn flower. See Ariya's -email on Sep 22, 2102:

- -
-"Blazing Star" is a mesmerizing and beautiful flower, it is often used -as a symbol representing happiness and satisfaction. Tending these -flowers requires some patience, the reward is however worth all the hassle. - -Its beautiful appearance makes it popular among gardeners, don't be -surprised if you are stunned by the florets for hours and hours. -Blazing star is also known to have mild medicinal characteristics. -A fabulous combination of outer beauty and inner beauty I would say. - -These days, with almost every web-related test framework gets -connected to PhantomJS in one way or another, presenting these -attractive yet romantic blossoms marking a joyful relationship could -not be a better honor for us. -
- -

Photo by Frank Wouters CC-BY
via Wikimedia Commons.

- -

PhantomJS 1.6 "Lavender"

- -

- -

Lavender is a summer flower. See Ariya's email on June 18, 2012:

- -
-...for this summer release, I pick the code name "Lavender". This summer flower is not -only beautiful, it is also known for its wonderful scent and soothing -quality, often served as a remedy for anything from sore joints to -insomnia. Well, with the widespread use of PhantomJS in various -testing frameworks since some releases ago, isn't that exactly what -this headless WebKit also brings to many web developers? Helping -people to stay calm, avoid anxiety, and increase their productivity is -surely a decent goal to have! -
- -
-

Photo by Fir0002/Flagstaffotos (Own work) CC-BY-NC
via Wikimedia Commons.

- - -

PhantomJS 1.5 "Ghost Flower"

- -

- -

Ghost Flower is a spring flower. See Ariya's email on March 15, 2012:

- -
-...for this spring release, I cast the code name "Ghost Flower". This spring flower is -rather beautiful actually. California, where I now reside, is one of -its native home. In addition, I'm sure you'll notice the significance -of the first word in the name :) -
- -
-

Photo by Stan Shebs (Own work) CC-BY-SA-3.0
via Wikimedia Commons.

- - -

PhantomJS 1.4 "Glory of the Snow"

- -

Dunkle Sternhyazinthe 2008-3-7a

- -

Glory of the Snow is a winter flower. See Ariya's email on Nov 29, 2011:

- -
-Approaching the final month before its very first birthday, I'm sure -we're all very happy to see that PhantomJS gains a lot of tractions -these days. There are reports of people using it with various -JavaScript test frameworks, along with assorted types of continuous -integration systems. The ecosystem grows and lately there seems to be -an increasing amount of projects using PhantomJS as a basis to do -something which was not possible before. In short, it spreads like -wild fire. Thus, it just makes sense for me to cast the winter release -of PhantomJS, i.e. version 1.4, as "Glory of the Snow". It's a winter -flower with beautiful colorful star petals which easily grows and -spreads to almost everywhere. -
- -
-

Photo by Hedwig Storch (Own work) CC-BY-SA-3.0
via Wikimedia Commons.

- -

PhantomJS 1.3 "Water Lily"

- -

Nymphaea japan

- -

Water Lily is an autumn flower. See Ariya's email on June 24, 2011:

- -
-When I started PhantomJS, I never thought it would be this -fascinating. Getting some interests from the integration testing folks -is awesome. In particular, I hope (we're getting there) PhantomJS can -be a nice solution for, among others, Ruby developers. Related to -this, hereby I designate the autumn release of PhantomJS, i.e. version 1.3, -as "Water Lily", an autumn flower considered by many to be the "jewels of the pond". -
- -
-

Photo by Kazuyanagae (Own work), CC-BY-SA-3.0
via Wikimedia Commons.

- -

PhantomJS 1.2 "Birds of Paradise"

- -

bird of paradise

- -

Birds of Paradise is a summer flower. See Ariya's email on May 31, 2011:

- -
-I feel honored that PhantomJS gains a lot of tractions and used by -many front-end developers. One particular striking example is Twitter. -Now, if I allow to pick a random bird (remember the tweet connection), -that'll be sunbird. In particular because Strelitzia nicolai is -pollinated by the sunbirds. -Strelitzia nicolai is just one species under the genus Strelitzia, -commonly known as the beautiful Birds of Paradise flowers. -
- -
- -

PhantomJS 1.1 "Cherry Blossom"

- -

- -

Cherry Blossom is a spring flower. See Ariya's email on Apr 9, 2011:

- -
-I would like to have "seasonal" PhantomJS release schedules. Thus, -this month seems to qualify very well for a Spring release of -PhantomJS 1.1. Most likely code name for this release is "Cherry -Blossom" since there are apparently lots of PhantomJS fans in Japan -(search for PhantomJS in Twitter) and with the recent difficult time -they have, paying homage to them is the least we can do." -
- - -
-
- - - - diff --git a/releases.html b/releases.html deleted file mode 100755 index 91aebf0d..00000000 --- a/releases.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - PhantomJS: Releases - - - - - - - - - - -
- - -
-
-

PhantomJS Releases

-
-
-
- -
- -
- -

PhantomJS 1.9 "Sakura", was released on March 20, 2013. It came with an updated GhostDriver, an improved resource loading control, as well as other incremental improvements.

- -

PhantomJS 1.8 "Blue Winter Rose", was released on December 21, 2012. It integrated GhostDriver, a remote WebDriver (Wire Protocol) implementation, and many related API addition.

- -

PhantomJS 1.7 "Blazing Star", was released on September 22, 2012. It added module system support (modelled after CommonJS), better cookies handling, and other small improvements.

- -

PhantomJS 1.6 "Lavender" was released on June 20, 2012. It is a minor update with some improvements on the rendering and script evaluation, as well as various bug fixes.

- -

PhantomJS 1.5 "Ghost Flower" was released on March 20, 2012. It added pure headless (no X11) for the Linux version, improved troubleshooting with interactive mode and remote debugger, and a new system module.

- -

PhantomJS 1.4 "Glory of the Snow" was released on December 22, 2011. It is a minor update, mostly bug fixes and one new major feature: WebServer module.

- -

PhantomJS 1.3 "Water Lily" was released on September 23, 2011. It added preliminary module syntax, file system support, mouse events, and other page-related improvements.

- -

PhantomJS 1.2 "Birds of Paradise" was released on June 21, 2011. It implemented an abstraction for web page object, added support for rasterization and network traffic monitoring.

- -

PhantomJS 1.1 "Cherry Blossom" was released on April 27, 2011. It added supports for file upload, network proxy, disk cache, GIF output. In addition, scripts can now be written in CoffeeScript.

- -
-
- - - - diff --git a/reset.css b/reset.css deleted file mode 100644 index 41cd8ff2..00000000 --- a/reset.css +++ /dev/null @@ -1,211 +0,0 @@ -/* `XHTML, HTML4, HTML5 Reset -----------------------------------------------------------------------------------------------------*/ - -a, -abbr, -acronym, -address, -applet, -article, -aside, -audio, -b, -big, -blockquote, -body, -canvas, -caption, -center, -cite, -code, -dd, -del, -details, -dfn, -dialog, -div, -dl, -dt, -em, -embed, -fieldset, -figcaption, -figure, -font, -footer, -form, -h1, -h2, -h3, -h4, -h5, -h6, -header, -hgroup, -hr, -html, -i, -iframe, -img, -ins, -kbd, -label, -legend, -li, -mark, -menu, -meter, -nav, -object, -ol, -output, -p, -pre, -progress, -q, -rp, -rt, -ruby, -s, -samp, -section, -small, -span, -strike, -strong, -sub, -summary, -sup, -table, -tbody, -td, -tfoot, -th, -thead, -time, -tr, -tt, -u, -ul, -var, -video, -xmp { - border: 0; - margin: 0; - padding: 0; - font-size: 100%; -} - -html, -body { - height: 100%; -} - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -menu, -nav, -section { -/* - Override the default (display: inline) for - browsers that do not recognize HTML5 tags. - - IE8 (and lower) requires a shiv: - http://ejohn.org/blog/html5-shiv -*/ - display: block; -} - -b, -strong { -/* - Makes browsers agree. - IE + Opera = font-weight: bold. - Gecko + WebKit = font-weight: bolder. -*/ - font-weight: bold; -} - -img { - color: transparent; - font-size: 0; - vertical-align: middle; -/* - For IE. - http://css-tricks.com/ie-fix-bicubic-scaling-for-images -*/ - -ms-interpolation-mode: bicubic; -} - -ol, -ul { - list-style: none; -} - -li { -/* - For IE6 + IE7: - - "display: list-item" keeps bullets from - disappearing if hasLayout is triggered. -*/ - display: list-item; -} - -table { - border-collapse: collapse; - border-spacing: 0; -} - -th, -td, -caption { - font-weight: normal; - vertical-align: top; - text-align: left; -} - -q { - quotes: none; -} - -q:before, -q:after { - content: ''; - content: none; -} - -sub, -sup, -small { - font-size: 75%; -} - -sub, -sup { - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sub { - bottom: -0.25em; -} - -sup { - top: -0.5em; -} - -svg { -/* - For IE9. Without, occasionally draws shapes - outside the boundaries of rectangle. -*/ - overflow: hidden; -} \ No newline at end of file diff --git a/screen.css b/screen.css deleted file mode 100644 index 0adbfa08..00000000 --- a/screen.css +++ /dev/null @@ -1,215 +0,0 @@ -/* -Credits -Icons from: http://www.smashingmagazine.com/2011/12/29/freebie-free-vector-web-icons-91-icons/ -*/ -@import "reset.css"; -@import "960_12_col.css"; - -body { - font-family: 'Droid Sans', 'Lucida Grande', sans-serif; - line-height: 1.125em; -} - -#intro { - background: #43413e; - color: #FFF; -} -#header { - height: 90px; -} - -#logo { - -} - -#nav { - text-align: right; - padding-top: 36px; -} - #nav li { - display: inline; - } - #nav a { - color: #e1e0dc; - text-decoration: none; - font-weight: bold; - text-transform: uppercase; - margin: 0 1em; - } - #nav a:hover { - color: #FFF; - } - -#introduction { - padding: 36px 0; -} - #introduction a { - color: #FFF; - } - - #introduction h1 { - color: #FFF; - font-weight: bold; - font-size: 2.25em; - line-height: 1em; - text-shadow: 0 -1px 0 #000; - margin: 0 0 1em 0; - } - - #introduction .explanation { - margin: 1em 0 2em 0; - font-size: 0.875em; - color: #e1e0dc; - } - #introduction .action a { - display: inline-block; - line-height: 54px; - color: #FFF; - font-size: 1.5em; - margin-right: 1em; - } - #download { - text-decoration: none; - height: 54px; - padding: 0 1em; - - border: 1px solid #004513; - border-radius: 4px; - - background: #7da21a; - background: -moz-linear-gradient(top, #afe225 0%, #7da21a 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#afe225), color-stop(100%,#7da21a)); - background: -webkit-linear-gradient(top, #afe225 0%,#7da21a 100%); - background: -o-linear-gradient(top, #afe225 0%,#7da21a 100%); - background: -ms-linear-gradient(top, #afe225 0%,#7da21a 100%); - background: linear-gradient(top, #afe225 0%,#7da21a 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#afe225', endColorstr='#7da21a',GradientType=0 ); - - font-weight: bold; - text-shadow: 0 -1px 0 #3d9700; - box-shadow: ; - - -webkit-box-shadow: - inset 0px 2px 0px 0px #def67e, - 0px 2px 5px rgba(0,0,0,.2); - -moz-box-shadow: - inset 0px 2px 0px 0px #def67e, - 0px 2px 5px rgba(0,0,0,.2); - box-shadow: - inset 0px 2px 0px 0px #def67e, - 0px 2px 5px rgba(0,0,0,.2); - } - #download:hover { - background: #97bd38; - background: -moz-linear-gradient(top, #bef038 0%, #97bd38 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#bef038), color-stop(100%,#97bd38)); - background: -webkit-linear-gradient(top, #bef038 0%,#97bd38 100%); - background: -o-linear-gradient(top, #bef038 0%,#97bd38 100%); - background: -ms-linear-gradient(top, #bef038 0%,#97bd38 100%); - background: linear-gradient(top, #bef038 0%,#97bd38 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#bef038', endColorstr='#97bd38',GradientType=0 ); - } - #download span { - font-weight: normal; - } - -#intro-example { - border-radius: 9px; - background: #373633; -} - #intro-example pre { - margin: 18px; - } - -#community { - background: #e1e0dc; - color: #43413e; - text-align: center; - font-size: 1.125em; - padding: 1.5em 0; -} - #community h2 { - font-weight: bold; - display: inline-block; - } - #community ul { - display: inline; - } - #community li { - list-style: none; - display: inline-block; - } - #community a { - margin: 0 1.5em; - color: #43413e; - text-decoration: none; - } - #community a:hover { - color: #000; - text-decoration: underline; - } - #link-release, - #link-ml, - #link-bugs { - display: inline-block; - padding-left: 44px; - height: 36px; - line-height: 36px; - background: url(images/icon-release.png) no-repeat 0 50%; - } - #link-ml { - background: url(images/icon-ml.png) no-repeat 0 50%; - } - #link-bugs { - background: url(images/icon-bugs.png) no-repeat 0 50%; - } - -#description { - color: #43413e; - padding-bottom: 2em; -} - #description h2 { - color: #2ecbd6; - font-size: 2.25em; - font-weight: bold; - margin: 1.5em 0; - text-align: center; - } - #description h3 { - font-weight: bold; - text-transform: uppercase; - } - #description .feature { - font-size: 0.875em; - } - #feature-end { - text-align: center; - margin: 1.5em 0 0 0; - } - -#footer { - background: #2ecbd6; - color: #FFF; - padding: 18px 0; - font-size: .875em; -} - #footer a { - color: #FFF; - } - -/* Simplified solarized */ -.solarized { - color: #839496; -} -.solarized .object { - color: #b58900; -} -.solarized .function { - color: #268bd2; -} -.solarized .literal { - color: #29a197; -} -.solarized .comment { - color: #586e75; -} \ No newline at end of file diff --git a/screen.min.css b/screen.min.css deleted file mode 100644 index 284c4a27..00000000 --- a/screen.min.css +++ /dev/null @@ -1,3 +0,0 @@ -a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,dialog,div,dl,dt,em,embed,fieldset,figcaption,figure,font,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,meter,nav,object,ol,output,p,pre,progress,q,rp,rt,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video,xmp{border:0;margin:0;padding:0;font-size:100%}html,body{height:100%}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}b,strong{font-weight:bold}img{color:transparent;font-size:0;vertical-align:middle;-ms-interpolation-mode:bicubic}ol,ul{list-style:none}li{display:list-item}table{border-collapse:collapse;border-spacing:0}th,td,caption{font-weight:normal;vertical-align:top;text-align:left}q{quotes:none}q:before,q:after{content:'';content:none}sub,sup,small{font-size:75%}sub,sup{line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}svg{overflow:hidden} -body{min-width:960px}.container_12{margin-left:auto;margin-right:auto;width:960px}.grid_1,.grid_2,.grid_3,.grid_4,.grid_5,.grid_6,.grid_7,.grid_8,.grid_9,.grid_10,.grid_11,.grid_12{display:inline;float:left;margin-left:10px;margin-right:10px}.push_1,.pull_1,.push_2,.pull_2,.push_3,.pull_3,.push_4,.pull_4,.push_5,.pull_5,.push_6,.pull_6,.push_7,.pull_7,.push_8,.pull_8,.push_9,.pull_9,.push_10,.pull_10,.push_11,.pull_11{position:relative}.alpha{margin-left:0}.omega{margin-right:0}.container_12 .grid_1{width:60px}.container_12 .grid_2{width:140px}.container_12 .grid_3{width:220px}.container_12 .grid_4{width:300px}.container_12 .grid_5{width:380px}.container_12 .grid_6{width:460px}.container_12 .grid_7{width:540px}.container_12 .grid_8{width:620px}.container_12 .grid_9{width:700px}.container_12 .grid_10{width:780px}.container_12 .grid_11{width:860px}.container_12 .grid_12{width:940px}.container_12 .prefix_1{padding-left:80px}.container_12 .prefix_2{padding-left:160px}.container_12 .prefix_3{padding-left:240px}.container_12 .prefix_4{padding-left:320px}.container_12 .prefix_5{padding-left:400px}.container_12 .prefix_6{padding-left:480px}.container_12 .prefix_7{padding-left:560px}.container_12 .prefix_8{padding-left:640px}.container_12 .prefix_9{padding-left:720px}.container_12 .prefix_10{padding-left:800px}.container_12 .prefix_11{padding-left:880px}.container_12 .suffix_1{padding-right:80px}.container_12 .suffix_2{padding-right:160px}.container_12 .suffix_3{padding-right:240px}.container_12 .suffix_4{padding-right:320px}.container_12 .suffix_5{padding-right:400px}.container_12 .suffix_6{padding-right:480px}.container_12 .suffix_7{padding-right:560px}.container_12 .suffix_8{padding-right:640px}.container_12 .suffix_9{padding-right:720px}.container_12 .suffix_10{padding-right:800px}.container_12 .suffix_11{padding-right:880px}.container_12 .push_1{left:80px}.container_12 .push_2{left:160px}.container_12 .push_3{left:240px}.container_12 .push_4{left:320px}.container_12 .push_5{left:400px}.container_12 .push_6{left:480px}.container_12 .push_7{left:560px}.container_12 .push_8{left:640px}.container_12 .push_9{left:720px}.container_12 .push_10{left:800px}.container_12 .push_11{left:880px}.container_12 .pull_1{left:-80px}.container_12 .pull_2{left:-160px}.container_12 .pull_3{left:-240px}.container_12 .pull_4{left:-320px}.container_12 .pull_5{left:-400px}.container_12 .pull_6{left:-480px}.container_12 .pull_7{left:-560px}.container_12 .pull_8{left:-640px}.container_12 .pull_9{left:-720px}.container_12 .pull_10{left:-800px}.container_12 .pull_11{left:-880px}.clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}.clearfix:before,.clearfix:after,.container_12:before,.container_12:after{content:'.';display:block;overflow:hidden;visibility:hidden;font-size:0;line-height:0;width:0;height:0}.clearfix:after,.container_12:after{clear:both}.clearfix,.container_12{zoom:1} -body{font-family:'Droid Sans','Lucida Grande',sans-serif;line-height:1.125em}#intro{background:#43413e;color:#FFF}#header{height:90px}#nav{text-align:right;padding-top:36px}#nav li{display:inline}#nav a{color:#e1e0dc;text-decoration:none;font-weight:bold;text-transform:uppercase;margin:0 1em}#nav a:hover{color:#FFF}#introduction{padding:36px 0}#introduction a{color:#FFF}#introduction h1{color:#FFF;font-weight:bold;font-size:2.25em;line-height:1em;text-shadow:0 -1px 0 #000;margin:0 0 1em 0}#introduction .explanation{margin:1em 0 2em 0;font-size:.875em;color:#e1e0dc}#introduction .action a{display:inline-block;line-height:54px;color:#FFF;font-size:1.5em;margin-right:1em}#download{text-decoration:none;height:54px;padding:0 1em;border:1px solid #004513;border-radius:4px;background:#7da21a;background:-moz-linear-gradient(top,#afe225 0,#7da21a 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#afe225),color-stop(100%,#7da21a));background:-webkit-linear-gradient(top,#afe225 0,#7da21a 100%);background:-o-linear-gradient(top,#afe225 0,#7da21a 100%);background:-ms-linear-gradient(top,#afe225 0,#7da21a 100%);background:linear-gradient(top,#afe225 0,#7da21a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#afe225',endColorstr='#7da21a',GradientType=0);font-weight:bold;text-shadow:0 -1px 0 #3d9700;box-shadow:;-webkit-box-shadow:inset 0 2px 0 0 #def67e,0px 2px 5px rgba(0,0,0,.2);-moz-box-shadow:inset 0 2px 0 0 #def67e,0px 2px 5px rgba(0,0,0,.2);box-shadow:inset 0 2px 0 0 #def67e,0px 2px 5px rgba(0,0,0,.2)}#download:hover{background:#97bd38;background:-moz-linear-gradient(top,#bef038 0,#97bd38 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#bef038),color-stop(100%,#97bd38));background:-webkit-linear-gradient(top,#bef038 0,#97bd38 100%);background:-o-linear-gradient(top,#bef038 0,#97bd38 100%);background:-ms-linear-gradient(top,#bef038 0,#97bd38 100%);background:linear-gradient(top,#bef038 0,#97bd38 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bef038',endColorstr='#97bd38',GradientType=0)}#download span{font-weight:normal}#intro-example{border-radius:9px;background:#373633}#intro-example pre{margin:18px}#community{background:#e1e0dc;color:#43413e;text-align:center;font-size:1.125em;padding:1.5em 0}#community h2{font-weight:bold;display:inline-block}#community ul{display:inline}#community li{list-style:none;display:inline-block}#community a{margin:0 1.5em;color:#43413e;text-decoration:none}#community a:hover{color:#000;text-decoration:underline}#link-release,#link-ml,#link-bugs{display:inline-block;padding-left:44px;height:36px;line-height:36px;background:url(images/icon-release.png) no-repeat 0 50%}#link-ml{background:url(images/icon-ml.png) no-repeat 0 50%}#link-bugs{background:url(images/icon-bugs.png) no-repeat 0 50%}#description{color:#43413e;padding-bottom:2em}#description h2{color:#2ecbd6;font-size:2.25em;font-weight:bold;margin:1.5em 0;text-align:center}#description h3{font-weight:bold;text-transform:uppercase}#description .feature{font-size:.875em}#feature-end{text-align:center;margin:1.5em 0 0 0}#footer{background:#2ecbd6;color:#FFF;padding:18px 0;font-size:.875em}#footer a{color:#FFF}.solarized{color:#839496}.solarized .object{color:#b58900}.solarized .function{color:#268bd2}.solarized .literal{color:#29a197}.solarized .comment{color:#586e75} \ No newline at end of file diff --git a/snippet.css b/snippet.css deleted file mode 100644 index 37883c64..00000000 --- a/snippet.css +++ /dev/null @@ -1,10 +0,0 @@ -pre.prettyprint { - border: 1px solid #ccc; - background-color: #f8f8f8; - border-radius: 3px; - padding: 6px 10px; - font-size: 13px; - line-height: 19px; - margin-right: 80px; - margin-left: 40px; -} diff --git a/style.css b/style.css deleted file mode 100644 index b32cd4ad..00000000 --- a/style.css +++ /dev/null @@ -1 +0,0 @@ -*{padding:0;margin:0}a img{border:0}body{background:url('images/bg.jpg') repeat-x #fff;color:#000;font-family:Arial,Helvetica,sans-serif}#wrapper{width:966px;margin:0 auto}#header{height:89px}#logo{float:left;margin-top:23px}#nav{float:right;margin-top:30px;font-size:11px;font-weight:bold;text-transform:uppercase;text-shadow:#ebebeb 1px 1px 0}#nav li{float:left;display:inline}#nav a{display:inline-block;padding:9px 13px;border:1px solid transparent;color:#383838;text-decoration:none}#nav li.active a{background:#d2d2d2;border:1px solid #e4e3e4;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}#nav a:hover{color:#000}#masthead{position:relative;background:url('images/masthead-bg.gif') #fff repeat-x;border:1px solid #8d8d8d;height:429px;padding-left:28px;margin:0 9px -2px;background-position:1px;-webkit-box-shadow:0 4px 2px 2px #b0b2b4}#masthead h2{width:370px;padding-top:50px;font-size:40px;line-height:36px;letter-spacing:-2px;font-weight:bold;color:#383838;text-shadow:1px 1px 0 #fff}#masthead p{width:445px;padding:21px 0 30px;font-family:Georgia,serif;font-size:15px;line-height:20px;color:#4f4f4f}#masthead li{list-style-type:none;float:left;display:inline;margin:0 11px 27px 0}.green-button{display:block;clear:left;width:230px;height:52px;line-height:52px;padding-left:50px;background:url('images/green-button.png') top left no-repeat;color:#fff;font-size:26px;font-weight:bold;text-transform:uppercase;text-shadow:1px 1px 3px #475d05;text-decoration:none;text-align:left}#raster{position:absolute;top:34px;right:17px;z-index:10}#blue-bar{position:relative;z-index:10;background:url('images/blue-bar.gif') no-repeat;width:966px;height:59px;color:#fff;text-shadow:1px 1px 0 #2e5668}#blue-bar ul{font-family:Georgia,serif;font-style:italic;float:right;list-style:none;padding:15px 30px 0 0}#blue-bar li{float:left;border-left:1px solid #fff;padding:0 15px}#blue-bar li:first-child{border-left:0;padding:0 15px 0 0}#blue-bar li a{color:#fff;text-decoration:none}#main{background:url('images/main-bg.gif') top center repeat-y;padding-bottom:50px}#content{float:left;width:610px;margin-left:6px;padding:42px 19px 0 20px}#content h2{font-size:43px;font-weight:normal;text-shadow:1px 1px 0 #fff;padding-bottom:20px;margin-bottom:45px;border-bottom:1px solid #fff;background:url('images/gray-border.png') bottom left repeat-x}.post{margin-bottom:40px}.post-thumbnail{float:left}.post h3{font-size:23px;font-weight:normal;margin:23px 4px 5px 4px}.features{padding-top:7px}.features li{float:left;display:inline;background:url('images/check.gif') center left no-repeat;font-size:12px;padding-left:25px;margin-left:16px}.post pre{margin:5px 10px 5px 25px;padding:4px 4px 4px 15px}.code{font-family:Menlo,Monaco,monospace;font-size:12px;background-color:#eee}.command{font-family:Menlo,Monaco,monospace;font-size:12px;background-color:#444;color:#ddd}.post p{clear:left;padding-left:25px;font-size:14px;line-height:22px;color:#454545}.details{display:inline-block;padding:4px 10px;margin-left:5px;background:#868686;font-family:Verdana,san-serif;font-size:10px;line-height:1em;color:#fff;text-decoration:none;text-transform:lowercase;border-bottom:1px solid #a1a1a1;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}#sidebar{float:left;width:256px;padding:36px 18px 0 21px}#sidebar h3{font-size:18px;font-weight:normal;text-shadow:1px 1px 0 #e9e9e9;padding-bottom:25px}#preview_update_list{padding-bottom:18px}#preview_update_list li{font-family:Georgia,serif;font-size:13px;line-height:20px;color:#4f4f4f;list-style-type:none;background:url('images/check.gif') no-repeat;background-position:0 4px;padding-left:25px;padding-bottom:10px}#preview_update_list a{color:#969696;text-decoration:none}#preview_update_list a[style="font-size: 85%;"]{display:block}#footer{font-size:11px;font-style:italic;font-family:Georgia,serif;color:#4f4f4f;background:url('images/main-bottom.gif') top center no-repeat;padding:29px 8px 30px 3px}#footer a{color:#4f4f4f;text-decoration:none}.f-left{float:left}.f-right{float:right}#masthead ul:after,#main:after,.post:after,#footer:after{content:".";display:block;height:0;clear:both;visibility:hidden}