phantomjs.rb 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. data/.gitignore +1 -0
  2. data/CHANGELOG +11 -0
  3. data/MIT-LICENSE +21 -0
  4. data/lib/phantomjs.rb +4 -2
  5. data/lib/phantomjs/version.rb +1 -1
  6. data/phantomjs.rb.gemspec +5 -1
  7. metadata +20 -186
  8. data/vendor/phantomjs-1.4.1_OSX/ChangeLog +0 -145
  9. data/vendor/phantomjs-1.4.1_OSX/LICENSE.BSD +0 -22
  10. data/vendor/phantomjs-1.4.1_OSX/README.md +0 -33
  11. data/vendor/phantomjs-1.4.1_OSX/bin/Info.plist +0 -12
  12. data/vendor/phantomjs-1.4.1_OSX/bin/phantomjs +0 -0
  13. data/vendor/phantomjs-1.4.1_OSX/examples/arguments.coffee +0 -6
  14. data/vendor/phantomjs-1.4.1_OSX/examples/arguments.js +0 -8
  15. data/vendor/phantomjs-1.4.1_OSX/examples/colorwheel.coffee +0 -46
  16. data/vendor/phantomjs-1.4.1_OSX/examples/colorwheel.js +0 -51
  17. data/vendor/phantomjs-1.4.1_OSX/examples/countdown.coffee +0 -8
  18. data/vendor/phantomjs-1.4.1_OSX/examples/countdown.js +0 -9
  19. data/vendor/phantomjs-1.4.1_OSX/examples/detectsniff.coffee +0 -40
  20. data/vendor/phantomjs-1.4.1_OSX/examples/detectsniff.js +0 -57
  21. data/vendor/phantomjs-1.4.1_OSX/examples/direction.coffee +0 -29
  22. data/vendor/phantomjs-1.4.1_OSX/examples/direction.js +0 -34
  23. data/vendor/phantomjs-1.4.1_OSX/examples/echoToFile.coffee +0 -19
  24. data/vendor/phantomjs-1.4.1_OSX/examples/echoToFile.js +0 -22
  25. data/vendor/phantomjs-1.4.1_OSX/examples/features.js +0 -30
  26. data/vendor/phantomjs-1.4.1_OSX/examples/fibo.coffee +0 -8
  27. data/vendor/phantomjs-1.4.1_OSX/examples/fibo.js +0 -9
  28. data/vendor/phantomjs-1.4.1_OSX/examples/follow.coffee +0 -54
  29. data/vendor/phantomjs-1.4.1_OSX/examples/follow.js +0 -59
  30. data/vendor/phantomjs-1.4.1_OSX/examples/hello.coffee +0 -2
  31. data/vendor/phantomjs-1.4.1_OSX/examples/hello.js +0 -2
  32. data/vendor/phantomjs-1.4.1_OSX/examples/imagebin.coffee +0 -19
  33. data/vendor/phantomjs-1.4.1_OSX/examples/imagebin.js +0 -22
  34. data/vendor/phantomjs-1.4.1_OSX/examples/injectme.coffee +0 -23
  35. data/vendor/phantomjs-1.4.1_OSX/examples/injectme.js +0 -25
  36. data/vendor/phantomjs-1.4.1_OSX/examples/ipgeocode.coffee +0 -13
  37. data/vendor/phantomjs-1.4.1_OSX/examples/ipgeocode.js +0 -14
  38. data/vendor/phantomjs-1.4.1_OSX/examples/loadspeed.coffee +0 -17
  39. data/vendor/phantomjs-1.4.1_OSX/examples/loadspeed.js +0 -22
  40. data/vendor/phantomjs-1.4.1_OSX/examples/modernizr.js +0 -1116
  41. data/vendor/phantomjs-1.4.1_OSX/examples/movies.coffee +0 -13
  42. data/vendor/phantomjs-1.4.1_OSX/examples/movies.js +0 -14
  43. data/vendor/phantomjs-1.4.1_OSX/examples/netlog.coffee +0 -17
  44. data/vendor/phantomjs-1.4.1_OSX/examples/netlog.js +0 -23
  45. data/vendor/phantomjs-1.4.1_OSX/examples/netsniff.coffee +0 -109
  46. data/vendor/phantomjs-1.4.1_OSX/examples/netsniff.js +0 -131
  47. data/vendor/phantomjs-1.4.1_OSX/examples/outputEncoding.coffee +0 -12
  48. data/vendor/phantomjs-1.4.1_OSX/examples/outputEncoding.js +0 -16
  49. data/vendor/phantomjs-1.4.1_OSX/examples/phantomwebintro.coffee +0 -13
  50. data/vendor/phantomjs-1.4.1_OSX/examples/phantomwebintro.js +0 -19
  51. data/vendor/phantomjs-1.4.1_OSX/examples/pizza.coffee +0 -18
  52. data/vendor/phantomjs-1.4.1_OSX/examples/pizza.js +0 -20
  53. data/vendor/phantomjs-1.4.1_OSX/examples/post.coffee +0 -12
  54. data/vendor/phantomjs-1.4.1_OSX/examples/post.js +0 -14
  55. data/vendor/phantomjs-1.4.1_OSX/examples/rasterize.coffee +0 -22
  56. data/vendor/phantomjs-1.4.1_OSX/examples/rasterize.js +0 -27
  57. data/vendor/phantomjs-1.4.1_OSX/examples/render_multi_url.coffee +0 -48
  58. data/vendor/phantomjs-1.4.1_OSX/examples/render_multi_url.js +0 -60
  59. data/vendor/phantomjs-1.4.1_OSX/examples/run-jasmine.coffee +0 -59
  60. data/vendor/phantomjs-1.4.1_OSX/examples/run-jasmine.js +0 -77
  61. data/vendor/phantomjs-1.4.1_OSX/examples/run-qunit.coffee +0 -62
  62. data/vendor/phantomjs-1.4.1_OSX/examples/run-qunit.js +0 -74
  63. data/vendor/phantomjs-1.4.1_OSX/examples/scandir.coffee +0 -15
  64. data/vendor/phantomjs-1.4.1_OSX/examples/scandir.js +0 -21
  65. data/vendor/phantomjs-1.4.1_OSX/examples/seasonfood.coffee +0 -17
  66. data/vendor/phantomjs-1.4.1_OSX/examples/seasonfood.js +0 -19
  67. data/vendor/phantomjs-1.4.1_OSX/examples/simpleserver.coffee +0 -35
  68. data/vendor/phantomjs-1.4.1_OSX/examples/simpleserver.js +0 -40
  69. data/vendor/phantomjs-1.4.1_OSX/examples/sleepsort.coffee +0 -17
  70. data/vendor/phantomjs-1.4.1_OSX/examples/sleepsort.js +0 -24
  71. data/vendor/phantomjs-1.4.1_OSX/examples/technews.coffee +0 -17
  72. data/vendor/phantomjs-1.4.1_OSX/examples/technews.js +0 -16
  73. data/vendor/phantomjs-1.4.1_OSX/examples/tweets.coffee +0 -30
  74. data/vendor/phantomjs-1.4.1_OSX/examples/tweets.js +0 -36
  75. data/vendor/phantomjs-1.4.1_OSX/examples/unrandomize.coffee +0 -18
  76. data/vendor/phantomjs-1.4.1_OSX/examples/unrandomize.js +0 -24
  77. data/vendor/phantomjs-1.4.1_OSX/examples/useragent.coffee +0 -11
  78. data/vendor/phantomjs-1.4.1_OSX/examples/useragent.js +0 -14
  79. data/vendor/phantomjs-1.4.1_OSX/examples/version.coffee +0 -5
  80. data/vendor/phantomjs-1.4.1_OSX/examples/version.js +0 -5
  81. data/vendor/phantomjs-1.4.1_OSX/examples/waitfor.coffee +0 -48
  82. data/vendor/phantomjs-1.4.1_OSX/examples/waitfor.js +0 -57
  83. data/vendor/phantomjs-1.4.1_OSX/examples/weather.coffee +0 -48
  84. data/vendor/phantomjs-1.4.1_OSX/examples/weather.js +0 -57
  85. data/vendor/phantomjs-1.4.1_OSX/lib/jquery.js +0 -8374
  86. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/ChangeLog +0 -177
  87. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/LICENSE.BSD +0 -22
  88. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/README.md +0 -33
  89. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/bin/Info.plist +0 -12
  90. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/bin/phantomjs +0 -0
  91. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/arguments.coffee +0 -7
  92. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/arguments.js +0 -9
  93. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/colorwheel.coffee +0 -46
  94. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/colorwheel.js +0 -51
  95. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/countdown.coffee +0 -8
  96. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/countdown.js +0 -9
  97. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/detectsniff.coffee +0 -41
  98. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/detectsniff.js +0 -58
  99. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/direction.coffee +0 -30
  100. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/direction.js +0 -35
  101. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/echoToFile.coffee +0 -20
  102. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/echoToFile.js +0 -24
  103. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/features.js +0 -30
  104. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/fibo.coffee +0 -8
  105. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/fibo.js +0 -9
  106. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/follow.coffee +0 -29
  107. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/follow.js +0 -34
  108. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/hello.coffee +0 -2
  109. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/hello.js +0 -2
  110. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/imagebin.coffee +0 -20
  111. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/imagebin.js +0 -23
  112. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/injectme.coffee +0 -23
  113. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/injectme.js +0 -25
  114. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/ipgeocode.coffee +0 -13
  115. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/ipgeocode.js +0 -14
  116. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/loadspeed.coffee +0 -18
  117. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/loadspeed.js +0 -23
  118. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/modernizr.js +0 -1116
  119. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/movies.coffee +0 -13
  120. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/movies.js +0 -14
  121. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/netlog.coffee +0 -18
  122. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/netlog.js +0 -25
  123. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/netsniff.coffee +0 -110
  124. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/netsniff.js +0 -132
  125. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/outputEncoding.coffee +0 -12
  126. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/outputEncoding.js +0 -16
  127. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/phantomwebintro.coffee +0 -13
  128. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/phantomwebintro.js +0 -19
  129. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/pizza.coffee +0 -18
  130. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/pizza.js +0 -20
  131. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/post.coffee +0 -12
  132. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/post.js +0 -14
  133. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/postserver.js +0 -34
  134. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/printenv.js +0 -10
  135. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/printmargins.js +0 -35
  136. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/rasterize.coffee +0 -23
  137. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/rasterize.js +0 -28
  138. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/render_multi_url.coffee +0 -50
  139. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/render_multi_url.js +0 -62
  140. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/run-jasmine.coffee +0 -61
  141. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/run-jasmine.js +0 -79
  142. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/run-qunit.coffee +0 -64
  143. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/run-qunit.js +0 -76
  144. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/scandir.coffee +0 -16
  145. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/scandir.js +0 -22
  146. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/seasonfood.coffee +0 -17
  147. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/seasonfood.js +0 -19
  148. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/server.js +0 -43
  149. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/serverkeepalive.js +0 -34
  150. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/simpleserver.coffee +0 -38
  151. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/simpleserver.js +0 -42
  152. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/sleepsort.coffee +0 -20
  153. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/sleepsort.js +0 -25
  154. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/technews.coffee +0 -17
  155. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/technews.js +0 -16
  156. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/tweets.coffee +0 -31
  157. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/tweets.js +0 -37
  158. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/unrandomize.coffee +0 -18
  159. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/unrandomize.js +0 -24
  160. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/useragent.coffee +0 -11
  161. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/useragent.js +0 -14
  162. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/version.coffee +0 -5
  163. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/version.js +0 -5
  164. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/waitfor.coffee +0 -48
  165. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/waitfor.js +0 -57
  166. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/weather.coffee +0 -49
  167. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/weather.js +0 -58
  168. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtCore.la +0 -28
  169. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtCore.prl +0 -7
  170. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtCore.so +0 -0
  171. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtCore.so.4 +0 -0
  172. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtCore.so.4.8 +0 -0
  173. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtCore.so.4.8.0 +0 -0
  174. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtGui.la +0 -28
  175. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtGui.prl +0 -7
  176. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtGui.so +0 -0
  177. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtGui.so.4 +0 -0
  178. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtGui.so.4.8 +0 -0
  179. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtGui.so.4.8.0 +0 -0
  180. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtNetwork.la +0 -28
  181. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtNetwork.prl +0 -7
  182. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtNetwork.so +0 -0
  183. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtNetwork.so.4 +0 -0
  184. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtNetwork.so.4.8 +0 -0
  185. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtNetwork.so.4.8.0 +0 -0
  186. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtWebKit.la +0 -28
  187. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtWebKit.prl +0 -6
  188. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtWebKit.so +0 -0
  189. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtWebKit.so.4 +0 -0
  190. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtWebKit.so.4.9 +0 -0
  191. data/vendor/phantomjs-1.5.0-liunx-x86-dynamic/lib/libQtWebKit.so.4.9.0 +0 -0
@@ -1,177 +0,0 @@
1
- Please see also http://code.google.com/p/phantomjs/wiki/ReleaseNotes.
2
-
3
- 2012-03-20: Version 1.5.0 "Ghost Flower"
4
-
5
- New features
6
-
7
- * Added interactive mode, also known as REPL (issue 252)
8
- * Added setting for web security, to allow cross domain XHR (issue 28)
9
- * Added error handler for WebPage object (issue 166)
10
- * Added support for custom HTTP header in the network request (issue 77)
11
- * Added support for read write encoding in the file system module (issue 367)
12
- * Added remote debugging support on Linux (issue 6)
13
- * Added support for proxy authentication (issue 105)
14
- * Added System module, to retrieve environment variables (issue 271) and arguments (issue 276)
15
- * Added fs.readLink function (issue 329)
16
- * Added support for reading and writing binary data (issue 400)
17
- * Added support to retrieve request data in the WebServer? module (issue 340)
18
- * Added support for individual top/bottom/left/right print margins (issue 388)
19
- * Added command-line option --help (issue 347)
20
- * Added short command-line options -v and -h (issue 408)
21
- * Removed support for Flash and other plugins (issue 418)
22
-
23
- Bug fixes
24
-
25
- * Fixed multiple console.log arguments (issue 36)
26
- * Fixed file upload (issue 307)
27
- * Fixed the web server instance to be asynchronous (issue 326) and still support Keep Alive (issue 416)
28
- * Workaround Qt 4.8.0 crash due to empty URL scheme (issue 365)
29
- * Fixed a Content-Type problem where POST does not work (issue 337)
30
- * Fixed reading body request in the web server even without specific Content-Type (issue 439)
31
- * Fixed Jasmine test runner with Jasmine 1.1 (issue 402)
32
- * Fixed request URL formatting in the web server (issue 437)
33
- * Don't display debugging and warning messages (issue 323)
34
-
35
- 2011-12-31: Version 1.4.1
36
-
37
- Bug fixes
38
-
39
- * Fix setting the proxy type (issue 266)
40
- * Workaround for file upload regression (issue 307)
41
- * Fix extraneous messsages in non-debug mode (issue 323)
42
-
43
- 2011-12-22: Version 1.4.0 "Glory of the Snow"
44
-
45
- New features
46
-
47
- * Added embedded HTTP server (issue 115)
48
- * Added convenient build script for Linux (issue 197)
49
- * Added support for SOCKS5 proxy (issue 266)
50
- * Updated CoffeeScript compiler to version 1.2 (issue 312)
51
-
52
- Bug fixes
53
-
54
- * Fix potential crash in QUrl with Qt 4.8 (issue 304)
55
- * Fix bug in CookieJar with QSettings and string (PyPhantomJS issue 10)
56
- * Prevent showing the icon on Mac OS X Dock (issue 281)
57
-
58
- Examples
59
-
60
- * Added a new example to detect browsers sniffing (issue 263)
61
- * Added HTTP server example (issue 115)
62
-
63
- 2011-09-23: Version 1.3.0 "Water Lily"
64
-
65
- Bug fixes
66
-
67
- * Fixed open() and POST method, without specifying the finished handler
68
- * Fixed script execution warning dialog (issue 165)
69
- * Added WebPage.release() to free the web page from memory (issue 154)
70
- * Added special handling of about:blank (issue 235)
71
- * Made a separate network access manager for each page (issue 190)
72
-
73
- New features
74
-
75
- * Introduced file system API based on CommonJS Filesystem proposal (issue 129)
76
- * Added support for persistent cookies (issue 91)
77
- * Added event handling, currently only for mouse events (issue 234)
78
- * Added page scroll position (issue 162)
79
- * Added HTTP authentication support (issue 45)
80
- * Added callback for page initialization (issue 143)
81
- * Added support to specify script and output encoding (issue 186)
82
- * Added option to allow local content to do cross-domain access (issue 28)
83
- * Added support to apply configurations from a JSON file (issue 180)
84
- * Added a convenient WebPage initialization construction (issue 206)
85
- * Added option to limit the size of disk cache (issue 220)
86
-
87
- Examples
88
-
89
- * Added a new example on using Modernizr to detect features (issue 144)
90
- * Fixed pizza.js example to use Mobile Yelp (issue 200)
91
- * Fixed netsniff.coffee example due to wrong indentation (issue 225)
92
- * Added an example to show live network traffic (issue 227)
93
- * Added an example demonstrating different output encodings (issue 186)
94
-
95
- 2011-06-21: Version 1.2.0 "Birds of Paradise"
96
-
97
- Version 1.2.0 is a major update. It introduces a whole set of new API.
98
-
99
- Bug fixes
100
-
101
- * Fixed rendering a very large web page (issue 54)
102
- * Fixed reporting of CoffeeScript compile error (issue 125)
103
-
104
- New features
105
-
106
- * Added callback for console message (issue 12)
107
- * Improved security model via WebPage object (issue 41)
108
- * Added support for POST, HEAD, PUT, and DELETE (issue 88)
109
- * Scripts filename is now passed as phantom.scriptName
110
- * Added callback to capture resource requests and responses (issue 2)
111
- * Added the ability to load external JavaScript (issue 32)
112
-
113
- Examples
114
-
115
- * Ported examples to use WebPage object
116
- * Added a new example to upload an image to imagebin.org
117
- * Added a new example to show HTTP POST feature
118
- * Added a new example to sniff network traffic and save it in HAR format
119
-
120
-
121
- 2011-04-27: Version 1.1.0 "Cherry Blossom"
122
-
123
- Fixed the script loading to use UTF-8 encoding (Yasuhiro Matsumoto).
124
-
125
- Added check for system proxy setting (Yasuhiro Matsumoto).
126
-
127
- Fixed building with Cygwin and Qt 4.5 (John Dalton).
128
-
129
- Added a new example: driver for QUnit tests (Łukasz Korecki).
130
-
131
- Fixed issue #20: problem with JPG transparent color (Alessandro Portale).
132
-
133
- Fixed issue #9: ignore first line starting with #! (Matthias, aka fourplusone).
134
-
135
- Fixed issue #7: support for file upload for form submission (Matthias, aka fourplusone).
136
-
137
- Fixed issue #35: support for disabling images loading (Ariya Hidayat).
138
-
139
- Fixed issue #14: enable or disable plugins (Ariya Hidayat).
140
-
141
- Added a new example: using Canvas to produce the color wheel (Ariya Hidayat).
142
-
143
- Added support for rasterizing as GIF image (Ariya Hidayat).
144
-
145
- Added support for CoffeeScript (Ariya Hidayat).
146
-
147
- Fixed issue #19: option for setting the proxy (Clint Berry, Ariya Hidayat).
148
-
149
- Python implementation using PyQt (James Roe).
150
-
151
- Fixed issue #17: Specify paper size for PDF export (Alessandro Portale).
152
-
153
- Fixed issue #60: Win32 and OS/2 icon files (Salvador Parra Camacho).
154
-
155
- Added clipping rectangle to the render function (Wouter de Bie).
156
-
157
- Added an example on sychronous waiting (Gabor Torok).
158
-
159
- Added command line option to use disk cache (Jon Turner).
160
-
161
- Added text extracting example (Weston Ruter).
162
-
163
- Fixed issue #93: Build with Qt < 4.7 (Ariya Hidayat).
164
-
165
- Ported all examples to CoffeeScript (Robert Gieseke).
166
-
167
- 2011-01-17: Version 1.0.0
168
-
169
- Initial launch.
170
-
171
- The API is centralized at the 'phantom' object (as child of
172
- window object) which has the properties: args, content,
173
- loadStatus, state, userAgent, version, viewportSize, and
174
- the following functions: exit, open, render, sleep.
175
-
176
- Several examples are included, among others: web page rasterizer,
177
- weather service, headless test framework driver, and many others.
@@ -1,22 +0,0 @@
1
- Redistribution and use in source and binary forms, with or without
2
- modification, are permitted provided that the following conditions are met:
3
-
4
- * Redistributions of source code must retain the above copyright
5
- notice, this list of conditions and the following disclaimer.
6
- * Redistributions in binary form must reproduce the above copyright
7
- notice, this list of conditions and the following disclaimer in the
8
- documentation and/or other materials provided with the distribution.
9
- * Neither the name of the <organization> nor the
10
- names of its contributors may be used to endorse or promote products
11
- derived from this software without specific prior written permission.
12
-
13
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
14
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
17
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
20
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,33 +0,0 @@
1
- PhantomJS ([www.phantomjs.org](http://phantomjs.org)) is a headless WebKit with JavaScript API.
2
-
3
- It has **fast** and **native** support for DOM handling, CSS selector, JSON, Canvas, and SVG.
4
-
5
- PhantomJS is cross-platform, it can be compiled for Linux, Windows, FreeBSD, and Mac OS X.
6
- Refer to the [build instructions](http://code.google.com/p/phantomjs/wiki/BuildInstructions)
7
- for details.
8
-
9
- **Note**: If you are on Mac OS X, [read the notice](http://code.google.com/p/phantomjs/wiki/BuildInstructions#Mac_OS_X)
10
- before you start using `brew` or `port` to install Qt and/or PhantomJS.
11
-
12
- PhantomJS scripts can be written in JavaScript or [CoffeeScript](http://jashkenas.github.com/coffee-script/).
13
-
14
- See also [quick start guide](http://code.google.com/p/phantomjs/wiki/QuickStart)
15
- and more [advanced examples](http://code.google.com/p/phantomjs/wiki/ServiceIntegration)
16
- which show various PhantomJS scripts, covering:
17
-
18
- * getting driving direction
19
- * showing weather forecast conditions
20
- * finding pizza in New York
21
- * looking up approximate location based on IP address
22
- * pulling the list of seasonal food
23
- * running regression tests from command line
24
- * producing PDF version of a Wikipedia article
25
- * rasterizing SVG to image
26
-
27
- Do not forget to consult the concise [API Reference](http://code.google.com/p/phantomjs/wiki/Interface).
28
-
29
- PhantomJS is based on [Qt](http://qt.nokia.com).
30
-
31
- The latest [stable release](http://code.google.com/p/phantomjs/wiki/ReleaseNotes) is version 1.5 ("Ghost Flower").
32
-
33
- If you want to contribute, please read the [Contribution Guide](http://code.google.com/p/phantomjs/wiki/ContributionGuide).
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
3
- <plist version="0.9">
4
- <dict>
5
- <key>CFBundleExecutable</key>
6
- <string>phantomjs</string>
7
- <key>CFBundleIdentifier</key>
8
- <string>org.phantomjs</string>
9
- <key>LSUIElement</key>
10
- <string>1</string>
11
- </dict>
12
- </plist>
@@ -1,7 +0,0 @@
1
- system = require 'system'
2
- if system.args.length is 1
3
- console.log 'Try to pass some args when invoking this script!'
4
- else
5
- for arg, i in system.args
6
- console.log i + ': ' + arg
7
- phantom.exit()
@@ -1,9 +0,0 @@
1
- var system = require('system');
2
- if (system.args.length === 1) {
3
- console.log('Try to pass some args when invoking this script!');
4
- } else {
5
- system.args.forEach(function (arg, i) {
6
- console.log(i + ': ' + arg);
7
- });
8
- }
9
- phantom.exit();
@@ -1,46 +0,0 @@
1
- page = require('webpage').create()
2
-
3
- page.viewportSize = { width: 400, height : 400 }
4
- page.content = '<html><body><canvas id="surface"></canvas></body></html>'
5
-
6
- page.evaluate ->
7
- el = document.getElementById 'surface'
8
- context = el.getContext '2d'
9
- width = window.innerWidth
10
- height = window.innerHeight
11
- cx = width / 2
12
- cy = height / 2
13
- radius = width / 2.3
14
- i = 0
15
-
16
- el.width = width
17
- el.height = height
18
- imageData = context.createImageData(width, height)
19
- pixels = imageData.data
20
-
21
- for y in [0...height]
22
- for x in [0...width]
23
- i = i + 4
24
- rx = x - cx
25
- ry = y - cy
26
- d = rx * rx + ry * ry
27
- if d < radius * radius
28
- hue = 6 * (Math.atan2(ry, rx) + Math.PI) / (2 * Math.PI)
29
- sat = Math.sqrt(d) / radius
30
- g = Math.floor(hue)
31
- f = hue - g
32
- u = 255 * (1 - sat)
33
- v = 255 * (1 - sat * f)
34
- w = 255 * (1 - sat * (1 - f))
35
- pixels[i] = [255, v, u, u, w, 255, 255][g]
36
- pixels[i + 1] = [w, 255, 255, v, u, u, w][g]
37
- pixels[i + 2] = [u, u, w, 255, 255, v, u][g]
38
- pixels[i + 3] = 255
39
-
40
- context.putImageData imageData, 0, 0
41
- document.body.style.backgroundColor = 'white'
42
- document.body.style.margin = '0px'
43
-
44
- page.render('colorwheel.png')
45
-
46
- phantom.exit()
@@ -1,51 +0,0 @@
1
- var page = require('webpage').create();
2
- page.viewportSize = { width: 400, height : 400 };
3
- page.content = '<html><body><canvas id="surface"></canvas></body></html>';
4
- page.evaluate(function() {
5
- var el = document.getElementById('surface'),
6
- context = el.getContext('2d'),
7
- width = window.innerWidth,
8
- height = window.innerHeight,
9
- cx = width / 2,
10
- cy = height / 2,
11
- radius = width / 2.3,
12
- imageData,
13
- pixels,
14
- hue, sat, value,
15
- i = 0, x, y, rx, ry, d,
16
- f, g, p, u, v, w, rgb;
17
-
18
- el.width = width;
19
- el.height = height;
20
- imageData = context.createImageData(width, height);
21
- pixels = imageData.data;
22
-
23
- for (y = 0; y < height; y = y + 1) {
24
- for (x = 0; x < width; x = x + 1, i = i + 4) {
25
- rx = x - cx;
26
- ry = y - cy;
27
- d = rx * rx + ry * ry;
28
- if (d < radius * radius) {
29
- hue = 6 * (Math.atan2(ry, rx) + Math.PI) / (2 * Math.PI);
30
- sat = Math.sqrt(d) / radius;
31
- g = Math.floor(hue);
32
- f = hue - g;
33
- u = 255 * (1 - sat);
34
- v = 255 * (1 - sat * f);
35
- w = 255 * (1 - sat * (1 - f));
36
- pixels[i] = [255, v, u, u, w, 255, 255][g];
37
- pixels[i + 1] = [w, 255, 255, v, u, u, w][g];
38
- pixels[i + 2] = [u, u, w, 255, 255, v, u][g];
39
- pixels[i + 3] = 255;
40
- }
41
- }
42
- }
43
-
44
- context.putImageData(imageData, 0, 0);
45
- document.body.style.backgroundColor = 'white';
46
- document.body.style.margin = '0px';
47
- });
48
-
49
- page.render('colorwheel.png');
50
-
51
- phantom.exit();
@@ -1,8 +0,0 @@
1
- t = 10
2
- interval = setInterval ->
3
- if t > 0
4
- console.log t--
5
- else
6
- console.log 'BLAST OFF!'
7
- phantom.exit()
8
- , 1000
@@ -1,9 +0,0 @@
1
- var t = 10,
2
- interval = setInterval(function(){
3
- if ( t > 0 ) {
4
- console.log(t--);
5
- } else {
6
- console.log("BLAST OFF!");
7
- phantom.exit();
8
- }
9
- }, 1000);
@@ -1,41 +0,0 @@
1
- page = require('webpage').create()
2
- system = require 'system'
3
-
4
- page.onInitialized = ->
5
- page.evaluate ->
6
- userAgent = window.navigator.userAgent
7
- platform = window.navigator.platform
8
- window.navigator =
9
- appCodeName: 'Mozilla'
10
- appName: 'Netscape'
11
- cookieEnabled: false
12
- sniffed: false
13
-
14
- window.navigator.__defineGetter__ 'userAgent', ->
15
- window.navigator.sniffed = true
16
- userAgent
17
-
18
- window.navigator.__defineGetter__ 'platform', ->
19
- window.navigator.sniffed = true
20
- platform
21
-
22
- if system.args.length is 1
23
- console.log 'Usage: unsniff.coffee <some URL>'
24
- phantom.exit()
25
- else
26
- address = system.args[1]
27
- console.log 'Checking ' + address + '...'
28
- page.open address, (status) ->
29
- if status isnt 'success'
30
- console.log 'FAIL to load the address'
31
- else
32
- window.setTimeout ->
33
- sniffed = page.evaluate(->
34
- navigator.sniffed
35
- )
36
- if sniffed
37
- console.log 'The page tried to sniff the user agent.'
38
- else
39
- console.log 'The page did not try to sniff the user agent.'
40
- phantom.exit()
41
- , 1500
@@ -1,58 +0,0 @@
1
- // Detect if a web page sniffs the user agent or not.
2
-
3
- var page = require('webpage').create(),
4
- system = require('system'),
5
- sniffed,
6
- address;
7
-
8
- page.onInitialized = function () {
9
- page.evaluate(function () {
10
-
11
- (function () {
12
- var userAgent = window.navigator.userAgent,
13
- platform = window.navigator.platform;
14
-
15
- window.navigator = {
16
- appCodeName: 'Mozilla',
17
- appName: 'Netscape',
18
- cookieEnabled: false,
19
- sniffed: false
20
- };
21
-
22
- window.navigator.__defineGetter__('userAgent', function () {
23
- window.navigator.sniffed = true;
24
- return userAgent;
25
- });
26
-
27
- window.navigator.__defineGetter__('platform', function () {
28
- window.navigator.sniffed = true;
29
- return platform;
30
- });
31
- })();
32
- });
33
- };
34
-
35
- if (system.args.length === 1) {
36
- console.log('Usage: unsniff.js <some URL>');
37
- phantom.exit();
38
- } else {
39
- address = system.args[1];
40
- console.log('Checking ' + address + '...');
41
- page.open(address, function (status) {
42
- if (status !== 'success') {
43
- console.log('FAIL to load the address');
44
- } else {
45
- window.setTimeout(function () {
46
- sniffed = page.evaluate(function () {
47
- return navigator.sniffed;
48
- });
49
- if (sniffed) {
50
- console.log('The page tried to sniff the user agent.');
51
- } else {
52
- console.log('The page did not try to sniff the user agent.');
53
- }
54
- phantom.exit();
55
- }, 1500);
56
- }
57
- });
58
- }