mechanize_content 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. data/.rvmrc +1 -0
  2. data/Rakefile +5 -0
  3. data/lib/mechanize_content/image.rb +61 -0
  4. data/lib/mechanize_content/page.rb +115 -0
  5. data/lib/mechanize_content/util.rb +4 -31
  6. data/lib/mechanize_content/version.rb +1 -1
  7. data/lib/mechanize_content.rb +8 -168
  8. data/mechanize_content.gemspec +2 -1
  9. data/spec/cassettes/MechanizeContent.yml +33742 -0
  10. data/spec/cassettes/MechanizeContent_Image.yml +279 -0
  11. data/spec/mechanize_content/image_spec.rb +39 -0
  12. data/spec/mechanize_content/page_spec.rb +90 -0
  13. data/spec/mechanize_content_spec.rb +149 -0
  14. data/spec/spec_helper.rb +11 -1
  15. metadata +29 -45
  16. data/spec/fixtures/a-fistful-of-red-dead-redemption-ps3-for-a-few-dollars-less-on.html +0 -754
  17. data/spec/fixtures/another-world-15th-anniversary-edition-now-on-gog-com.html +0 -2416
  18. data/spec/fixtures/another_world_15th_anniversary_edition.html +0 -805
  19. data/spec/fixtures/cmp.html +0 -333
  20. data/spec/fixtures/episodes_from_liberty_city_now_coming_to_playstation_3_and_pc_this_april.html +0 -1593
  21. data/spec/fixtures/gdc_2010_rounds_off_indie_cove.html +0 -698
  22. data/spec/fixtures/google.html +0 -42
  23. data/spec/fixtures/gta-iv-episodes-from-liberty-city-sees-slight-delay-on-pc-and-ps3.html +0 -1012
  24. data/spec/fixtures/johnny.jpg +0 -0
  25. data/spec/fixtures/joystiq-xbox-usb-support-580.jpg +0 -0
  26. data/spec/fixtures/mutiny.html +0 -264
  27. data/spec/fixtures/nuff-said-good-old-games-gets-another-world-168150.html +0 -5492
  28. data/spec/fixtures/rock-band-3-out-this-holiday-will-revolutionize-genre.html +0 -1157
  29. data/spec/fixtures/rockband_facebook.html +0 -93
  30. data/spec/fixtures/spartan.html +0 -391
  31. data/spec/fixtures/techmeme.html +0 -2216
  32. data/spec/fixtures/time-warner-retail-egm.html +0 -49
  33. data/spec/fixtures/witcher.html +0 -458
  34. data/spec/fixtures/xbox-360-gaining-usb-storage-support-in-2010-update.html +0 -2462
  35. data/spec/mechanize-content_spec.rb +0 -202
@@ -1,49 +0,0 @@
1
- HTTP/1.1 200 OK
2
- Date: Fri, 23 Jul 2010 21:41:44 GMT
3
- Server: LiteSpeed
4
- Accept-Ranges: bytes
5
- Connection: close
6
- ETag: "128e-4b2fad51-0"
7
- Last-Modified: Mon, 21 Dec 2009 17:16:01 GMT
8
- Content-Type: text/html
9
- Content-Length: 4750
10
- Cache-Control: max-age=1209600
11
- Expires: Fri, 06 Aug 2010 21:41:44 GMT
12
-
13
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
14
- <html xmlns="http://www.w3.org/1999/xhtml">
15
- <head>
16
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
17
- <title>Press Release</title>
18
- <style type="text/css">
19
- <!--
20
- #container {
21
- margin: 0 auto;
22
- width: 780px;
23
- }
24
- -->
25
- </style>
26
- <link href="../style.css" rel="stylesheet" type="text/css" />
27
- </head>
28
-
29
- <body>
30
- <div id="container">
31
- <div align="center">
32
- <p><img src="../images/egmlogo.jpg" width="640" height="227" border="0" /></p>
33
- <p class="headliner">EGM MEDIA, LLC ENTERS INTO AGREEMENT<br />
34
- WITH TIME/WARNER RETAIL SALES &amp; MARKETING<br />
35
- FOR NEWSSTAND DISTRIBUTION OF<br />
36
- ELECTRONIC GAMING MONTHLY MAGAZINE</p>
37
- <p class="subhead">EGM Re-Launch to Be Handled By Nation&rsquo;s Leading Newsstand Magazine Distributor</p>
38
- <p align="left" class="bodycopy"><strong>December 18, 2009 - Beverly Hills, CA </strong><span class="bodycopy">&ndash; EGM Media LLC, publisher of leading independent video game magazine &quot;Electronic Gaming Monthly,&quot; announced today that it has entered into an agreement with Time/Warner Retail Sales &amp; Marketing to handle newsstand marketing and sales for the title when it returns to bookstores, newsstands, and other retailers in March 2010.</span></p>
39
- <p align="left" class="bodycopy"><span class="bodycopy"> &ldquo;Time Warner Retail is the preeminent player in the single-copy field so it should be no surprise that we have selected them to represent the print version of the publication,&rdquo; said Steve Harris, publisher of Electronic Gaming Monthly and president of EGM Media, LLC. &ldquo;The fact Time/Warner Retail&rsquo;s relationship with the title goes back nearly twenty years made this an easy decision and one that will immediately benefit our efforts.&rdquo;</span></p>
40
- <p align="left" class="bodycopy"><span class="bodycopy"> &ldquo;We&rsquo;re thrilled to once again be representing one of the leading titles in its category,&rdquo; said Mike Bogas, Senior Marketing Manager of Time/Warner Retail Sales &amp; Marketing. &ldquo;Electronic Gaming Monthly is a brand that is synonymous with the gaming field and one that has consistently performed well for us in the past. The new changes that EGM is making to integrate print and digital will only enhance the product further.&rdquo; </span></p>
41
- <p align="left" class="bodycopy"><span class="bodycopy"> The new print version of Electronic Gaming Monthly includes a special code included in each newsstand copy that upgrades each reader&rsquo;s access to the new weekly interactive version of the magazine. This enhanced version of the digital publication, called EGM[i]: The Digital Magazine contains exclusive article extensions and original content throughout each issue.</span></p>
42
- <p align="left" class="bodycopy"><span class="bodycopy"> &quot;With our new weekly digital format, and the premium enhancement that newsstand purchasers will receive, we're changing the value proposition in a new and meaningful way,&quot; explained Harris. &quot;Not only does the digital companion allow us to offer additional content that is complementary to the print magazine, but it also gives us a way to communicate with our readers and update the print product in an ongoing manner.&quot; </span></p>
43
- <p align="left" class="bodycopy"><span class="bodycopy"> This first issue of the new print edition of Electronic Gaming Monthly will carry an April cover and include a special cover story continuing the EGM tradition of highlighting the best games of the year. The premier issue of the re-launch will also boast game previews, a new Review Crew featuring the return of Sushi-X, and commentary from a host of columnists including EGM personalities such as Quartermann, Dan &ldquo;Shoe&rdquo; Hsu, Sean &ldquo;Seanbaby&rdquo; Reiley, and many others.</span></p>
44
- <p align="center" class="bodycopy">#&nbsp;&nbsp; #&nbsp;&nbsp; #</p>
45
- <p align="left" class="bodycopy"><span class="bodycopy">About Electronic Gaming Monthly magazine:&nbsp;Electronic Gaming Monthly (aka &quot;EGM&quot;) was founded more than 20 years ago by Steve Harris and remains&nbsp;one of the most respected gaming brands of its kind.&nbsp;&nbsp;EGM's cutting-edge editorial style and hard-hitting&nbsp;content have earned it a reputation for being a trusted and independent voice&nbsp;in the gaming community.&nbsp; EGM Media Group acquired the rights to the publication from Ziff Davis Media&nbsp;and is currently planning to re-launch the magazine in print (Electronic Gaming Monthly), digitally (EGM[i]: The Digital Magazine), and online (EGMNOW.com)</span>.</p>
46
- </div>
47
- </div>
48
- </body>
49
- </html>
@@ -1,458 +0,0 @@
1
- HTTP/1.1 200 OK
2
- Date: Fri, 23 Jul 2010 19:55:27 GMT
3
- Server: Apache
4
- X-Powered-By: PHP/5.2.6-1+lenny8
5
- Set-Cookie: PHPSESSID=lf1sjgjcje0kn52o5nntgpplv2; path=/; domain=.thewitcher.com
6
- Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate, post-check=0, pre-check=0
7
- Vary: Accept-Encoding
8
- Transfer-Encoding: chunked
9
- Content-Type: text/html; charset=utf-8
10
-
11
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
12
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
- <head>
14
- <meta name="author" content="Bitterlix" />
15
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
16
- <meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate, proxy-revalidate, post-check=0, pre-check=0" />
17
- <meta name="title" content="The Witcher" />
18
- <meta name="description" content="The Witcher is back! The second entry in the Witcher saga is characterized by an incredibly gripping, mature and challenging non-linear plot." />
19
- <meta name="keywords" content="Wicher, wiedzmin, hexer, rpg, crpg, assassins, kings, sapkowski, slavic, mature, adult, game" />
20
- <title>The Witcher</title>
21
- <link rel="shortcut icon" href="/favicon.ico" />
22
- <script type="text/javascript" src="/js/AC_OETags.js"></script>
23
- <style type="text/css">
24
- <!--
25
- table.news_foot { margin-left:382px; }
26
- #fixme {
27
- /* Netscape 4, IE 4.x-5.0/Win and other lesser browsers will use this */
28
- position: absolute; bottom: 0px;
29
- }
30
- body > div#fixme {
31
- /* used by Opera 5+, Netscape6+/Mozilla, Konqueror, Safari, OmniWeb 4.5+, iCab, ICEbrowser */
32
- position: fixed;
33
- }
34
- //-->
35
- </style>
36
- <!--[if gte IE 5.5]>
37
- <![if lt IE 7]>
38
- <style type="text/css">
39
- div#fixme {
40
- /* IE5.5+/Win - this is more specific than the IE 5.0 version */
41
- right: auto; bottom: auto;
42
- left: expression( ( -20 - fixme.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
43
- top: expression( ( -10 - fixme.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
44
- }
45
- </style>
46
- <![endif]>
47
- <![endif]-->
48
-
49
- <!--[if lte IE 7]>
50
- <style type="text/css">
51
- table.news_foot { margin-left:126px; }
52
- div#fixme {
53
- right: auto;
54
- position: absolute;
55
- bottom: 0px;
56
-
57
- left: expression( ( -fixme.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
58
- }
59
- </style>
60
- <![endif]-->
61
-
62
- <script type="text/javascript" src="/js/prototype.js"></script>
63
- <script type="text/javascript" src="/js/src/scriptaculous.js"></script>
64
- <script type="text/javascript" src="/js/src/lightbox.js"></script>
65
- <script type="text/javascript" src="/js/utils.js"></script>
66
- <script type="text/javascript" src="/js/video.js"></script>
67
- <script type="text/javascript" src="/js/src/lightbox_video.js"></script>
68
- <script type="text/javascript" src="/js/www_utils.js"></script>
69
- <script type="text/javascript" src="/js/pngFix.js"></script>
70
- <script type="text/javascript" src="/js/swfobject.js"></script>
71
- <link rel="stylesheet" type="text/css" media="screen" href="/css/main.css" />
72
- <link rel="stylesheet" type="text/css" media="screen" href="/css/www.css" />
73
- <link rel="stylesheet" type="text/css" media="screen" href="/css/lightbox.css" />
74
- <link rel="stylesheet" type="text/css" media="screen" href="/css/logo.css" />
75
- </head><!--
76
- <body> //--><body style="overflow-x:hidden;">
77
-
78
-
79
- <script type="text/javascript" language="javascript">
80
- <!--
81
-
82
- if (navigator.userAgent.toLowerCase().search('msie') != -1/* || !DetectFlashVer(8, 0, 0)*/) {
83
- document.body.style.backgroundImage = 'url("/images/www/main_back.jpg")';
84
- }
85
- //-->
86
- </script>
87
- <!--[if lte IE 7]>
88
- <link rel="stylesheet" type="text/css" media="screen" href="/css/ie_style.css" />
89
- <![endif]-->
90
-
91
- <!--[if gte IE 8]>
92
- <link rel="stylesheet" type="text/css" media="screen" href="/css/ie8_style.css" />
93
- <![endif]-->
94
-
95
- <!--[if lt IE 7]>
96
- <style type="text/css">
97
- body {behavior: url(/css/csshover.htc);}
98
- </style>
99
- <![endif]-->
100
-
101
- <script type="text/javascript">
102
-
103
- if (navigator.userAgent.toLowerCase().search('msie') == -1) {
104
-
105
- swfobject.embedSWF('/images/VideoAsset.swf', 'dynamic_bg', '100%', '668', '9.0.45', false,
106
- { },
107
- { bgcolor: '#FFFFFF', menu: 'false', wmode: 'transparent' },
108
- {id: 'dynamic_bg'});
109
- }
110
-
111
- </script>
112
-
113
- <div style="overflow:hidden;" id="dynamic_bg_outer">
114
- <div style="overflow:hidden;" id="bg_position">
115
- <div id="dynamic_bg"><!-- //--></div>
116
- </div>
117
- </div>
118
-
119
- <script type="text/javascript">
120
- <!--
121
- if (navigator.userAgent.toLowerCase().search('msie') != -1) {
122
- $('dynamic_bg_outer').style.display = "none";
123
- }
124
- //-->
125
- </script>
126
- <table width="100%" style="position:absolute; top:0px;"><tr><td align="center" valign="top">
127
- <div class="positioner" id="positioner">
128
- <div class="main" id="main">
129
- <form method="post" id="form" action="/">
130
-
131
- <div class="logo_tw2_en agegate_position"></div>
132
- <div style="position:absolute;top:315px;left:13px;background-image:url('/images/bramka/buda.png'); width:511px; height:140px;">
133
-
134
- <div style="position:relative; z-index:10000;">
135
-
136
- <div id="safari_fix1" style="color:#828282; font-weight:bold; font-size:22px; position:absolute; top:5px; left:94px; color:#a8a9a9;">
137
- ENTER YOUR DATE OF BIRTH:</div>
138
-
139
- <div style="position:absolute; top:60px; left:150px;">
140
-
141
- <select style="font-size:16px; background-color:#a8a9a9; border:0px;" name="month" id="month">
142
- <option label="January" value="1" selected="selected">January</option>
143
- <option label="February" value="2">February</option>
144
- <option label="March" value="3">March</option>
145
- <option label="April" value="4">April</option>
146
- <option label="May" value="5">May</option>
147
- <option label="June" value="6">June</option>
148
- <option label="July" value="7">July</option>
149
- <option label="August" value="8">August</option>
150
- <option label="September" value="9">September</option>
151
- <option label="October" value="10">October</option>
152
- <option label="November" value="11">November</option>
153
- <option label="December" value="12">December</option>
154
- </select>
155
-
156
- <select style="font-size:16px; border:0px; background-color:#a8a9a9;" name="day" id="day">
157
- <option label="01" value="1" selected="selected">01</option>
158
- <option label="02" value="2">02</option>
159
- <option label="03" value="3">03</option>
160
- <option label="04" value="4">04</option>
161
- <option label="05" value="5">05</option>
162
- <option label="06" value="6">06</option>
163
- <option label="07" value="7">07</option>
164
- <option label="08" value="8">08</option>
165
- <option label="09" value="9">09</option>
166
- <option label="10" value="10">10</option>
167
- <option label="11" value="11">11</option>
168
- <option label="12" value="12">12</option>
169
- <option label="13" value="13">13</option>
170
- <option label="14" value="14">14</option>
171
- <option label="15" value="15">15</option>
172
- <option label="16" value="16">16</option>
173
- <option label="17" value="17">17</option>
174
- <option label="18" value="18">18</option>
175
- <option label="19" value="19">19</option>
176
- <option label="20" value="20">20</option>
177
- <option label="21" value="21">21</option>
178
- <option label="22" value="22">22</option>
179
- <option label="23" value="23">23</option>
180
- <option label="24" value="24">24</option>
181
- <option label="25" value="25">25</option>
182
- <option label="26" value="26">26</option>
183
- <option label="27" value="27">27</option>
184
- <option label="28" value="28">28</option>
185
- <option label="29" value="29">29</option>
186
- <option label="30" value="30">30</option>
187
- <option label="31" value="31">31</option>
188
- </select>
189
- <select style="font-size:16px; border:0px; background-color:#a8a9a9;" name="year" id="year">
190
- <option label="Year" value="" selected="selected">Year</option>
191
- <option label="2009" value="2009">2009</option>
192
- <option label="2008" value="2008">2008</option>
193
- <option label="2007" value="2007">2007</option>
194
- <option label="2006" value="2006">2006</option>
195
- <option label="2005" value="2005">2005</option>
196
- <option label="2004" value="2004">2004</option>
197
- <option label="2003" value="2003">2003</option>
198
- <option label="2002" value="2002">2002</option>
199
- <option label="2001" value="2001">2001</option>
200
- <option label="2000" value="2000">2000</option>
201
- <option label="1999" value="1999">1999</option>
202
- <option label="1998" value="1998">1998</option>
203
- <option label="1997" value="1997">1997</option>
204
- <option label="1996" value="1996">1996</option>
205
- <option label="1995" value="1995">1995</option>
206
- <option label="1994" value="1994">1994</option>
207
- <option label="1993" value="1993">1993</option>
208
- <option label="1992" value="1992">1992</option>
209
- <option label="1991" value="1991">1991</option>
210
- <option label="1990" value="1990">1990</option>
211
- <option label="1989" value="1989">1989</option>
212
- <option label="1988" value="1988">1988</option>
213
- <option label="1987" value="1987">1987</option>
214
- <option label="1986" value="1986">1986</option>
215
- <option label="1985" value="1985">1985</option>
216
- <option label="1984" value="1984">1984</option>
217
- <option label="1983" value="1983">1983</option>
218
- <option label="1982" value="1982">1982</option>
219
- <option label="1981" value="1981">1981</option>
220
- <option label="1980" value="1980">1980</option>
221
- <option label="1979" value="1979">1979</option>
222
- <option label="1978" value="1978">1978</option>
223
- <option label="1977" value="1977">1977</option>
224
- <option label="1976" value="1976">1976</option>
225
- <option label="1975" value="1975">1975</option>
226
- <option label="1974" value="1974">1974</option>
227
- <option label="1973" value="1973">1973</option>
228
- <option label="1972" value="1972">1972</option>
229
- <option label="1971" value="1971">1971</option>
230
- <option label="1970" value="1970">1970</option>
231
- <option label="1969" value="1969">1969</option>
232
- <option label="1968" value="1968">1968</option>
233
- <option label="1967" value="1967">1967</option>
234
- <option label="1966" value="1966">1966</option>
235
- <option label="1965" value="1965">1965</option>
236
- <option label="1964" value="1964">1964</option>
237
- <option label="1963" value="1963">1963</option>
238
- <option label="1962" value="1962">1962</option>
239
- <option label="1961" value="1961">1961</option>
240
- <option label="1960" value="1960">1960</option>
241
- <option label="1959" value="1959">1959</option>
242
- <option label="1958" value="1958">1958</option>
243
- <option label="1957" value="1957">1957</option>
244
- <option label="1956" value="1956">1956</option>
245
- <option label="1955" value="1955">1955</option>
246
- <option label="1954" value="1954">1954</option>
247
- <option label="1953" value="1953">1953</option>
248
- <option label="1952" value="1952">1952</option>
249
- <option label="1951" value="1951">1951</option>
250
- <option label="1950" value="1950">1950</option>
251
- <option label="1949" value="1949">1949</option>
252
- <option label="1948" value="1948">1948</option>
253
- <option label="1947" value="1947">1947</option>
254
- <option label="1946" value="1946">1946</option>
255
- <option label="1945" value="1945">1945</option>
256
- <option label="1944" value="1944">1944</option>
257
- <option label="1943" value="1943">1943</option>
258
- <option label="1942" value="1942">1942</option>
259
- <option label="1941" value="1941">1941</option>
260
- <option label="1940" value="1940">1940</option>
261
- <option label="1939" value="1939">1939</option>
262
- <option label="1938" value="1938">1938</option>
263
- <option label="1937" value="1937">1937</option>
264
- <option label="1936" value="1936">1936</option>
265
- <option label="1935" value="1935">1935</option>
266
- <option label="1934" value="1934">1934</option>
267
- <option label="1933" value="1933">1933</option>
268
- <option label="1932" value="1932">1932</option>
269
- <option label="1931" value="1931">1931</option>
270
- <option label="1930" value="1930">1930</option>
271
- <option label="1929" value="1929">1929</option>
272
- <option label="1928" value="1928">1928</option>
273
- <option label="1927" value="1927">1927</option>
274
- <option label="1926" value="1926">1926</option>
275
- <option label="1925" value="1925">1925</option>
276
- <option label="1924" value="1924">1924</option>
277
- <option label="1923" value="1923">1923</option>
278
- <option label="1922" value="1922">1922</option>
279
- <option label="1921" value="1921">1921</option>
280
- <option label="1920" value="1920">1920</option>
281
- <option label="1919" value="1919">1919</option>
282
- <option label="1918" value="1918">1918</option>
283
- <option label="1917" value="1917">1917</option>
284
- <option label="1916" value="1916">1916</option>
285
- <option label="1915" value="1915">1915</option>
286
- <option label="1914" value="1914">1914</option>
287
- <option label="1913" value="1913">1913</option>
288
- <option label="1912" value="1912">1912</option>
289
- <option label="1911" value="1911">1911</option>
290
- <option label="1910" value="1910">1910</option>
291
- <option label="1909" value="1909">1909</option>
292
- <option label="1908" value="1908">1908</option>
293
- <option label="1907" value="1907">1907</option>
294
- <option label="1906" value="1906">1906</option>
295
- <option label="1905" value="1905">1905</option>
296
- <option label="1904" value="1904">1904</option>
297
- <option label="1903" value="1903">1903</option>
298
- <option label="1902" value="1902">1902</option>
299
- <option label="1901" value="1901">1901</option>
300
- <option label="1900" value="1900">1900</option>
301
- </select>
302
-
303
- </div>
304
-
305
- <div onclick="checkAge();" id="safari_fix2"
306
- onmouseout="document.getElementById('button').style.color='#a8a9a9';"
307
- onmouseover="document.getElementById('button').style.color='#d2d2d2';"
308
- style="position:absolute; top:108px; left:176px; cursor:pointer;background-image:url('http://www.thewitcher.com/images/bramka/continue.png'); width:165px; height:32px;">
309
- <div style="font-size:16px;font-weight:bold;color:#a8a9a9;padding-top:5px;" id="button">Continue</div>
310
- </div>
311
-
312
- </div>
313
-
314
- </form>
315
- </div>
316
- </div>
317
- </td></tr></table>
318
- <script language="Javascript" type="text/javascript">
319
- <!--
320
-
321
- document.getElementById('year').onkeydown = function (e) {
322
-
323
- e = !e ? window.event : e;
324
-
325
- if (e.keyCode == 13) {
326
- checkAge();
327
- }
328
- };
329
-
330
- document.getElementById('month').onkeydown = function (e) {
331
-
332
- e = !e ? window.event : e;
333
-
334
- if (e.keyCode == 13) {
335
- checkAge();
336
- }
337
- };
338
-
339
- document.getElementById('day').onkeydown = function (e) {
340
-
341
- e = !e ? window.event : e;
342
-
343
- if (e.keyCode == 13) {
344
- checkAge();
345
- }
346
- };
347
-
348
-
349
- function getIEVersion() {
350
-
351
- if (navigator.appName == 'Microsoft Internet Explorer') {
352
-
353
- var agent = navigator.userAgent;
354
- var expression = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
355
-
356
- if (expression.exec(agent) != null)
357
- return parseFloat(RegExp.$1);
358
- }
359
-
360
- return -1;
361
- }
362
-
363
- function menuBack() { }
364
-
365
- function ReadCookie(cookieName) {
366
-
367
- var cookie = "" + document.cookie;
368
- var ind = cookie.indexOf(cookieName);
369
-
370
- if (ind == -1 || cookieName == "")
371
- return "";
372
-
373
- var ind1 = cookie.indexOf(';', ind);
374
-
375
- if (ind1 == -1)
376
- ind1 = cookie.length;
377
-
378
- return unescape(cookie.substring(ind + cookieName.length + 1, ind1));
379
- }
380
-
381
- function Set_Cookie( name, value, domain)
382
- {
383
- var today = new Date();
384
- today.setTime( today.getTime() );
385
-
386
- var expires = 1000 * 60 * 60 * 24 * 365;
387
- var expires_date = new Date(today.getTime() + expires);
388
-
389
- document.cookie = name + "=" + escape( value ) +
390
- (expires ? ";expires=" + expires_date.toGMTString() : "") +
391
- (domain ? ";domain=" + domain : "");
392
- }
393
-
394
- window.setInterval(function () {
395
-
396
- if (ReadCookie('agegate') == '2')
397
- document.getElementById('positioner').innerHTML = '<div style="color:#d2d2d2;font-size:24px; padding-top:300px;">Access to this page is denied</div>';
398
-
399
- }, 100);
400
-
401
- var skip = 0;
402
-
403
- function checkAge() {
404
-
405
- var y = window.parseInt(document.getElementById('year').value);
406
- var m = window.parseInt(document.getElementById('month').value);
407
- var d = window.parseInt(document.getElementById('day').value);
408
-
409
- if (isNaN(y))
410
- return;
411
-
412
- var now = new Date();
413
- var today = now.getTime();
414
- var userDate = new Date(y, m, d);
415
- var diff = Math.abs(today - userDate.getTime());
416
-
417
- var years = diff / 1000 /* milseconds */ / 60 /* seconds */ / 60 /* minutes */ / 24 /* hours */ / 365 /* days */;
418
- years = Math.floor(years);
419
-
420
- if (isNaN(years))
421
- return;
422
-
423
- if (years >= 18) {
424
- document.getElementById('form').submit();
425
- }
426
- else {
427
- window.setTimeout(function () {
428
- Set_Cookie("agegate", "2", "thewitcher.com");
429
- document.getElementById('positioner').innerHTML = '<div style="color:#d2d2d2;font-size:24px; padding-top:300px;">Access to this page is denied</div>';
430
- window.location = "http://www.cdprojekt.pl";
431
- }, 100);
432
- }
433
-
434
- document.getElementById('form').submit();
435
- }
436
-
437
- //-->
438
- </script> <script type="text/javascript" language="javascript">
439
- <!--
440
-
441
- Utils.lock = false;
442
- Utils.redirect();
443
- Utils.updateContentMaskHeight();
444
- Utils.historyObserve();
445
- //-->
446
- </script>
447
- <script type="text/javascript">
448
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
449
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
450
- </script>
451
-
452
- <script type="text/javascript">
453
- try {
454
- var pageTracker = _gat._getTracker("UA-15416796-2");
455
- pageTracker._trackPageview();
456
- } catch(err) {}</script>
457
- </body>
458
- </html>