Loading content, please wait..
           
 

1. 美擬對與中國政府有關聯的駭客提出刑事指控    2. 中國評論人士:華為事件預示西方“鐵幕”即將降臨    3. 中國警告加拿大:如不釋放孟晚舟必將造成嚴重後果    4. 美國堅持對華強硬立場 美中休戰細節浮出水面    5. 華為靠矽谷崛起,但可能毀於華盛頓之手    6. 華為跌倒誰受益?    7. 孟晚舟被捕體現美國執行制裁的決心    8. 波音退出中國資助的Global IP衛星項目    9. 華為高管被捕加劇美中對抗    10. 華為為何如此重要?    11. 美國將矛頭對準華為,與中國展開更激烈對抗    12. 滙豐控股監督人向檢方舉報華為可疑交易    13. 遭加拿大逮捕的孟晚舟被視作華為明日之星    14. 加拿大當局應美國要求逮捕華為CFO孟晚舟    15. 特朗普任命對華強硬派萊特希澤負責美中貿易談判    16. 中國首次承認90天的中美貿易談判期限    17. 中國如何巧取波音絕密衛星技術?    18. 道指暴跌近800點,因貿易和經濟擔憂重燃    19. 特朗普團隊擬在90天談判中採取強硬立場    20. 中國在全球商用電動汽車市場獨領風騷   
  公開資訊觀測站 | 證券櫃檯買賣中心 | 興櫃即時行情      

EMail:
密碼:
認證碼:
記住EMail
忘記密碼
免費加入會員
 
 
line
 
 
長紅未上市股票資訊網 > 最新消息  
 
 

cn.wsj.com


cn.wsj.com /* Copyright 2017 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */a { color: rgb(88, 88, 88);}body { --google-blue-600: #1A73E8; --google-blue-700: #1967D2; background-color: #fff; color: rgb(100, 100, 100); word-wrap: break-word;}#details-button { background: inherit; border: 0; float: none; margin: 0; padding: 10px 0; text-transform: uppercase;}.hidden { display: none;}html { -webkit-text-size-adjust: 100%; font-size: 125%;}.icon { background-repeat: no-repeat; background-size: 100%;} /* Copyright 2014 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */button { border: 0; border-radius: 4px; box-sizing: border-box; color: #fff; cursor: pointer; float: right; font-size: .875em; margin: 0; padding: 10px 24px; transition: box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1); user-select: none;}[dir='rtl'] button { float: left;}.bad-clock button,.captive-portal button,.main-frame-blocked button,.neterror button,.offline button,.pdf button,.ssl button,.safe-browsing-billing button { background: var(--google-blue-600);}button:active { background: var(--google-blue-700); outline: 0;}button:hover { box-shadow: 0 1px 3px rgba(0, 0, 0, .50);}#debugging { display: inline; overflow: auto;}.debugging-content { line-height: 1em; margin-bottom: 0; margin-top: 1em;}.debugging-content-fixed-width { display: block; font-family: monospace; font-size: 1.2em; margin-top: 0.5em;}.debugging-title { font-weight: bold;}#details { color: #696969; margin: 0 0 50px;}#details p:not(:first-of-type) { margin-top: 20px;}#details-button:hover { box-shadow: inherit; text-decoration: underline;}.error-code { color: #646464; font-size: .86667em; text-transform: uppercase; margin-top: 12px;}#error-debugging-info { font-size: 0.8em;}h1 { color: #333; font-size: 1.6em; font-weight: normal; line-height: 1.25em; margin-bottom: 16px;}h2 { font-size: 1.2em; font-weight: normal;}.icon { height: 72px; margin: 0 0 40px; width: 72px;}input[type=checkbox] { opacity: 0;}input[type=checkbox]:focus ~ .checkbox { outline: -webkit-focus-ring-color auto 5px;}.interstitial-wrapper { box-sizing: border-box; font-size: 1em; line-height: 1.6em; margin: 14vh auto 0; max-width: 600px; width: 100%;}#main-message > p { display: inline;}#extended-reporting-opt-in { font-size: .875em; margin-top: 39px;}#extended-reporting-opt-in label { position: relative; display: flex; align-items: flex-start;}.nav-wrapper { margin-top: 51px;}.nav-wrapper::after { clear: both; content: ''; display: table; width: 100%;}.small-link { color: #696969; font-size: .875em;}.checkboxes { flex: 0 0 24px;}.checkbox { background: transparent; border: 1px solid white; border-radius: 2px; display: block; height: 14px; left: 0; position: absolute; right: 0; top: 3px; width: 14px;}.checkbox::before { background: transparent; border: 2px solid white; border-right-width: 0; border-top-width: 0; content: ''; height: 4px; left: 2px; opacity: 0; position: absolute; top: 3px; transform: rotate(-45deg); width: 9px;}input[type=checkbox]:checked ~ .checkbox::before { opacity: 1;}#recurrent-error-message { background: #ededed; border-radius: 4px; padding: 12px 16px; margin-top: 12px; margin-bottom: 16px;}.showing-recurrent-error-message #extended-reporting-opt-in { margin-top: 16px;}@media (max-width: 700px) { .interstitial-wrapper { padding: 0 10%; } #error-debugging-info { overflow: auto; }}@media (max-width: 420px) { button, [dir='rtl'] button, .small-link { float: none; font-size: .825em; font-weight: 400; margin: 0; text-transform: uppercase; width: 100%; } #details { margin: 20px 0 20px 0; } #details p:not(:first-of-type) { margin-top: 10px; } #details-button { display: block; margin-top: 20px; text-align: center; width: 100%; } .interstitial-wrapper { padding: 0 5%; } #extended-reporting-opt-in { margin-top: 24px; } .nav-wrapper { margin-top: 30px; }}/** * Mobile specific styling. * Navigation buttons are anchored to the bottom of the screen. * Details message replaces the top content in its own scrollable area. */@media (max-width: 420px) { #details-button { border: 0; margin: 8px 0 0; } .secondary-button { margin-inline-end: 0; margin-top: 16px; }}/* Fixed nav. */@media (min-width: 240px) and (max-width: 420px) and (min-height: 401px), (min-width: 421px) and (min-height: 240px) and (max-height: 560px) { body .nav-wrapper { background: #fff; bottom: 0; box-shadow: 0 -22px 40px #fff; left: 0; margin: 0 auto; max-width: 736px; padding-left: 24px; padding-right: 24px; position: fixed; right: 0; width: 100%; z-index: 2; } .interstitial-wrapper { max-width: 736px; } #details, #main-content { padding-bottom: 40px; } #details { padding-top: 5.5vh; } #details-button:hover { box-shadow: none; } button { padding: 16px 24px; } button.small-link { color: var(--google-blue-600); }}@media (max-width: 420px) and (orientation: portrait), (max-height: 560px) { body { margin: 0 auto; } button, [dir='rtl'] button, button.small-link { font-family: Roboto-Regular,Helvetica; font-size: .933em; font-weight: 600; margin: 6px 0; text-transform: uppercase; transform: translatez(0); } .nav-wrapper { box-sizing: border-box; padding-bottom: 8px; width: 100%; } #details { box-sizing: border-box; height: auto; margin: 0; opacity: 1; transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1); } #details.hidden, #main-content.hidden { display: block; height: 0; opacity: 0; overflow: hidden; padding-bottom: 0; transition: none; } #details-button { padding-bottom: 16px; padding-top: 16px; } h1 { font-size: 1.5em; margin-bottom: 8px; } .icon { margin-bottom: 5.69vh; } .interstitial-wrapper { box-sizing: border-box; margin: 7vh auto 12px; padding: 0 24px; position: relative; } .interstitial-wrapper p { font-size: .95em; line-height: 1.61em; margin-top: 8px; } #main-content { margin: 0; transition: opacity 100ms cubic-bezier(0.4, 0, 0.2, 1); } .small-link { border: 0; } .suggested-left > #control-buttons, .suggested-right > #control-buttons { float: none; margin: 0; }}@media (min-width: 421px) and (min-height: 500px) and (max-height: 560px) { .interstitial-wrapper { margin-top: 10vh; }}@media (min-height: 400px) and (orientation:portrait) { .interstitial-wrapper { margin-bottom: 145px; }}@media (min-height: 299px) { .nav-wrapper { padding-bottom: 16px; }}@media (min-height: 500px) and (max-height: 650px) and (max-width: 414px) and (orientation: portrait) { .interstitial-wrapper { margin-top: 7vh; }}@media (min-height: 650px) and (max-width: 414px) and (orientation: portrait) { .interstitial-wrapper { margin-top: 10vh; }}/* Small mobile screens. No fixed nav. */@media (max-height: 400px) and (orientation: portrait), (max-height: 239px) and (orientation: landscape), (max-width: 419px) and (max-height: 399px) { .interstitial-wrapper { display: flex; flex-direction: column; margin-bottom: 0; } #details { flex: 1 1 auto; order: 0; } #main-content { flex: 1 1 auto; order: 0; } .nav-wrapper { flex: 0 1 auto; margin-top: 8px; order: 1; padding-left: 0; padding-right: 0; position: relative; width: 100%; } button { padding: 16px 24px; } button.small-link { color: var(--google-blue-600); }}@media (max-width: 239px) and (orientation: portrait) { .nav-wrapper { padding-left: 0; padding-right: 0; }} /* Copyright 2013 The Chromium Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. *//* Don't use the main frame div when the error is in a subframe. */html[subframe] #main-frame-error { display: none;}/* Don't use the subframe error div when the error is in a main frame. */html:not([subframe]) #sub-frame-error { display: none;}#diagnose-button { float: none; margin-bottom: 10px; margin-inline-start: 0; margin-top: 20px;}h1 { margin-top: 0; word-wrap: break-word;}h1 span { font-weight: 500;}h2 { color: #666; font-size: 1.2em; font-weight: normal; margin: 10px 0;}a { color: rgb(17, 85, 204); text-decoration: none;}.icon { -webkit-user-select: none; display: inline-block;}.icon-generic { /** * Can't access chrome://theme/IDR_ERROR_NETWORK_GENERIC from an untrusted * renderer process, so embed the resource manually. */ content: -webkit-image-set( url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABIAQMAAABvIyEEAAAABlBMVEUAAABTU1OoaSf/AAAAAXRSTlMAQObYZgAAAENJREFUeF7tzbEJACEQRNGBLeAasBCza2lLEGx0CxFGG9hBMDDxRy/72O9FMnIFapGylsu1fgoBdkXfUHLrQgdfrlJN1BdYBjQQm3UAAAAASUVORK5CYII=) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACQAQMAAADdiHD7AAAABlBMVEUAAABTU1OoaSf/AAAAAXRSTlMAQObYZgAAAFJJREFUeF7t0cENgDAMQ9FwYgxG6WjpaIzCCAxQxVggFuDiCvlLOeRdHR9yzjncHVoq3npu+wQUrUuJHylSTmBaespJyJQoObUeyxDQb3bEm5Au81c0pSCD8HYAAAAASUVORK5CYII=) 2x);}.icon-offline { content: -webkit-image-set( url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABIAQMAAABvIyEEAAAABlBMVEUAAABTU1OoaSf/AAAAAXRSTlMAQObYZgAAAGxJREFUeF7tyMEJwkAQRuFf5ipMKxYQiJ3Z2nSwrWwBA0+DQZcdxEOueaePp9+dQZFB7GpUcURSVU66yVNFj6LFICatThZB6r/ko/pbRpUgilY0Cbw5sNmb9txGXUKyuH7eV25x39DtJXUNPQGJtWFV+BT/QAAAAABJRU5ErkJggg==) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACQBAMAAAAVaP+LAAAAGFBMVEUAAABTU1NNTU1TU1NPT09SUlJSUlJTU1O8B7DEAAAAB3RSTlMAoArVKvVgBuEdKgAAAJ1JREFUeF7t1TEOwyAMQNG0Q6/UE+RMXD9d/tC6womIFSL9P+MnAYOXeTIzMzMzMzMzaz8J9Ri6HoITmuHXhISE8nEh9yxDh55aCEUoTGbbQwjqHwIkRAEiIaG0+0AA9VBMaE89Rogeoww936MQrWdBr4GN/z0IAdQ6nQ/FIpRXDwHcA+JIJcQowQAlFUA0MfQpXLlVQfkzR4igS6ENjknm/wiaGhsAAAAASUVORK5CYII=) 2x); position: relative;}.icon-disabled { content: -webkit-image-set( url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABICAMAAAAZF4G5AAAABlBMVEVMaXFTU1OXUj8tAAAAAXRSTlMAQObYZgAAASZJREFUeAHd11Fq7jAMRGGf/W/6PoWB67YMqv5DybwG/CFjRuR8JBw3+ByiRjgV9W/TJ31P0tBfC6+cj1haUFXKHmVJo5wP98WwQ0ZCbfUc6LQ6VuUBz31ikADkLMkDrfUC4rR6QGW+gF6rx7NaHWCj1Y/W6lf4L7utvgBSt3rBFSS/XBMPUILcJINHCBWYUfpWn4NBi1ZfudIc3rf6/NGEvEA+AsYTJozmXemjXeLZAov+mnkN2HfzXpMSVQDnGw++57qNJ4D1xitA2sJ+VAWMygSEaYf2mYPTjZfk2K8wmP7HLIH5Mg4/pP+PEcDzUvDMvYbs/2NWwPO5vBdMZE4EE5UTQLiBFDaUlTDPBRoJ9HdAYIkIo06og3BNXtCzy7zA1aXk5x+tJARq63eAygAAAABJRU5ErkJggg==) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOAAAACQAQMAAAArwfVjAAAABlBMVEVMaXFTU1OXUj8tAAAAAXRSTlMAQObYZgAAAYdJREFUeF7F1EFqwzAUBNARAmVj0FZe5QoBH6BX+dn4GlY2PYNzGx/A0CvkCIJuvIraKJKbgBvzf2g62weDGD7CYggpfFReis4J0ey9EGFIiEQQojFSlA9kSIiqd0KkFjKsewgRbStEN19mxUPTtmW9HQ/h6tyqNQ8NlSMZdzyE6qkoE0trVYGFm0n1WYeBhduzwbwBC7voS+vIxfeMjeaiLxsMMtQNwMPtuew+DjzcTHk8YMfDknEcIUOtf2lVfgVH3K4Xv5PRYAXRVMtItIJ3rfaCIVn9DsTH2NxisAVRex2Hh3hX+/mRUR08bAwPEYsI51ZxWH4Q0SpicQRXeyEaIug48FEdegARfMz/tADVsRciwTAxW308ehmC2gLraC+YCbV3QoTZexa+zegAEW5PhhgYfmbvJgcRqngGByOSXdFJcLk2JeDPEN0kxe1JhIt5FiFA+w+ItMELsUyPF2IaJ4aILqb4FbxPwhImwj6JauKgDUCYaxmYIsd4KXdMjIC9ItB5Bn4BNRwsG0XM2nwAAAAASUVORK5CYII=) 2x); width: 112px;}.error-code { display: block; font-size: .8em;}#content-top { margin: 20px;}#help-box-inner { background-color: #f9f9f9; border-top: 1px solid #EEE; color: #444; padding: 20px; text-align: start;}.hidden { display: none;}#suggestion { margin-top: 15px;}#suggestions-list p { margin-block-end: 0;}#suggestions-list ul { margin-top: 0;}.single-suggestion { list-style-type: none; padding-left: 0;}#short-suggestion { margin-top: 5px;}#error-information-button { content: -webkit-image-set( url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAABW0lEQVR4XrXUz0oCURgFcMfF3BfQVi3aKGPvENIrCIoexY2LEfUteoECqXdQRvrjK7SNwQfQBm0bRZnpxg4fF259iBARZ3O49/vBJ9wxhV/mz8CgiRESbJgEERow+0AVT9iqLFDZDdK4koEHhMjBZ/JoIxbU560GMv6BllrRI18JUaAq4yfSjzHGEu+4RSCoKKT8HRjZvWXHX9kleLGkzT6H70BTdpeOMXuEDLK4Zruxi8XsdQdGBKEFS/aMtAO2N3vaYR86kBDkkFI5JHi2PWCfObAh8BXI4p7gzALDvt4HjvDIs0ukNXAr5X+AOxl3JwWCqQMRQdsC9dNtegQDBxoEMTwHVDxMCGoOGCxIQgewZRzo8jaBb4GkQrBCcSc4xSdBST++vpBQLeahK+MXu543CROjgwCGKaCHiZydI62ATRlzbFUSlPZ9oj7qGGKGNTPFADX9Av7/X+MLzRFdO1bUSOcAAAAASUVORK5CYII=) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAQAAAD9CzEMAAAC8klEQVR4Xu3XT0tUURjH8Rx1bFRQHBsZy5cg/sHBeQMtjcAw+EIQ4jBvoJhxVi0s3RbaaBjtlBo0IrFtFLQNB+mPfwqtFjLaIitnhJo2Dw8c7lzvmckWgZzt4fnc+9zzO+eeU/zjcSzACeAjSopFVtnjkEP2WGWBUfrx/T3QwQRfKLqMT4xztnKglRkOKXqMAmmClQCwR9Fy7HK5PKCWe0aBb8wxQoQgfvy0EiHGPPsGcpcaW6CeZbQ4awwToPS8EdZRgiUCNkAtz7T4T66Zz+WcTYIDJZ5S4w1oc1in0yoBXWwqMeUFoFNfEzLgHqZZo0CB96TpMog2VpQYOgo4oytn3SgfYNZMAL+Z5rRByFuQo8UdmNHedxrlX5RMwHOD6CYvxKQb0KGxum6ws64JSBvzkgLkaS8NTOjCrDF6L+V4wwD1NHCBd9qoLiM9G0LcLAX4dM8ZNto2reWbFG1Wwlw1MQG2qXICUU2tGZc1AQYM9qIAbw2gge9CRJxASoA5MxcUBKg3gEbttzn7oQBJJ7AowIhVuJoE+GECxAXIOIFVfTkb4KoArxQwG511ABqxoAXQzVcBrpgAIY2bA5AM4PcELulG/ZgqE6BOgELlwJjmYlnWmx2gLWo9Erih5R9IHC1aZP+Re/jlCJj1R14QIOYOcF/mvMSngPUyHRVg3h3QLfm864xHAiScQL8A+0ZmS6e6wQVo1K2izwn4+GyfZY8GbRmbnY5xPc1qKwL8fBBgTEkDOKctSLgAkgAXIKUbYNjtyEwLcEBX2UCvHpl33M/kILtCbNJWFhDmo+A7NJuAOS5rkRXarIEwWcUHve4HaSU26bb6uL3y9NIeL6CGJSUOSHqsKD8p8jr/CdU294MASlBkg5hLsBqJy8KU8hY/v/oWUwJIunlInCgh6qgjRJQ4GUmtNofq8i4gQ+QoWo4dBiu5QrUwSd4TyHOb5sovge3cYtsV2GKM8HFcYyMkyZAlR4ECObJkSNBH1f9wET8B/gBL8HSO2oN+FwAAAABJRU5ErkJggg==) 2x); height: 24px; vertical-align: -.15em; width: 24px;}.use-popup-container#error-information-popup-container #error-information-popup { align-items: center; background-color: rgba(0,0,0,.65); display: flex; height: 100%; left: 0; position: fixed; top: 0; width: 100%; z-index: 100;}.use-popup-container#error-information-popup-container #error-information-popup-content > p { margin-bottom: 11px; margin-inline-start: 20px;}.use-popup-container#error-information-popup-container #suggestions-list ul { margin-inline-start: 15px;}.use-popup-container#error-information-popup-container #error-information-popup-box { background-color: white; left: 5%; padding-bottom: 15px; padding-top: 15px; position: fixed; width: 90%; z-index: 101;}.use-popup-container#error-information-popup-container div.error-code { margin-inline-start: 20px;}.use-popup-container#error-information-popup-container #suggestions-list p { margin-inline-start: 20px;}:not(.use-popup-container)#error-information-popup-container #error-information-popup-close { display: none;}#error-information-popup-close { margin-bottom: 0px; margin-inline-end: 35px; margin-top: 15px; text-align: end;}.link-button { color: rgb(66, 133, 244); display: inline-block; font-weight: bold; text-transform: uppercase;}#sub-frame-error-details { color: #8F8F8F; /* Not done on mobile for performance reasons. */ text-shadow: 0 1px 0 rgba(255,255,255,0.3);}[jscontent=hostName],[jscontent=failedUrl] { overflow-wrap: break-word;}#search-container { /* Prevents a space between controls. */ display: flex; margin-top: 20px;}#search-box { border: 1px solid #cdcdcd; flex-grow: 1; font-size: 1em; height: 26px; margin-right: 0; padding: 1px 9px;}#search-box:focus { border: 1px solid rgb(93, 154, 255); outline: none;}#search-button { border: none; border-bottom-left-radius: 0; border-top-left-radius: 0; box-shadow: none; display: flex; height: 30px; margin: 0; padding: 0; width: 60px;}#search-image { content: -webkit-image-set( url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAQAAAB+HTb/AAAArElEQVR4Xn3NsUoCUBzG0XvB3U0chR4geo5qihpt6gkCx0bXFsMERWj2KWqIanAvmlUUoQapwU6g4l8H5bd9Z/iSPS0hu/RqZqrncBuzLl7U3Rn4cSpQFTeroejJl1Lgs7f4ceDPdeBMXYp86gaONYJkY83AnqHiGk9wHnjk16PKgo5N9BUCkzPf5j6M0PfuVg5MymoetFwoaKAlB26WdXAvJ7u5mezitqtkT//7Sv/u96CaLQAAAABJRU5ErkJggg==) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAeCAQAAACVzLYUAAABYElEQVR4Xr3VMUuVURzH8XO98jgkGikENkRD0KRGDUVDQy0h2SiC4IuIiktL4AvQt1CDBJUJwo1KXXS6cWdHw7tcjWwoC5Hrx+UZgnNO5CXiO/75jD/+QZf9MzjskVU7DrU1zRv9G9ir5hsA4Nii83+GA9ZI1nI1D6tWAE1TRlQMuuuFDthzMQefgo4nKr+f3dIGDdUUHPYD1ISoMQdgJgUfgqaKEOcxWE/BVTArJBvwC0cGY7gNLgiZNsD1GP4EPVn4EtyLYRuczcJ34HYMP4E7GdajDS7FcB48z8AJ8FmI4TjouBkzZ2yBuRQMlsButIZ+dfDVUBqOaIHvavpLVHXfFmAqv45r9gEHNr3y3hcAfLSgSMPgiiZR+6Z9AMuKNAwqpjUcA2h55pxgAfBWkYRlQ254YMJloaxPHbCkiGCymL5RlLA7GnRDXyuC7uhicLoKdRyaDE5Pl00K//93nABqPgBDK8sfWgAAAABJRU5ErkJggg==) 2x); margin: auto;}.secondary-button { background: #d9d9d9; color: #696969; margin-inline-end: 16px;}.snackbar { background: #323232; border-radius: 2px; bottom: 24px; box-sizing: border-box; color: #fff; font-size: .87em; left: 24px; max-width: 568px; min-width: 288px; opacity: 0; padding: 16px 24px 12px; position: fixed; transform: translateY(90px); will-change: opacity, transform; z-index: 999;}.snackbar-show { -webkit-animation: show-snackbar .25s cubic-bezier(0.0, 0.0, 0.2, 1) forwards, hide-snackbar .25s cubic-bezier(0.4, 0.0, 1, 1) forwards 5s;}@-webkit-keyframes show-snackbar { 100% { opacity: 1; transform: translateY(0); }}@-webkit-keyframes hide-snackbar { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(90px); }}.suggestions { margin-top: 18px;}.suggestion-header { font-weight: bold; margin-bottom: 4px;}.suggestion-body { color: #777;}/* Increase line height at higher resolutions. */@media (min-width: 641px) and (min-height: 641px) { #help-box-inner { line-height: 18px; }}/* Decrease padding at low sizes. */@media (max-width: 640px), (max-height: 640px) { h1 { margin: 0 0 15px; } #content-top { margin: 15px; } #help-box-inner { padding: 20px; } .suggestions { margin-top: 10px; } .suggestion-header { margin-bottom: 0; }}#download-link, #download-link-clicked { margin-bottom: 15px;}#download-link-clicked { color: #BBB;}#download-link:before, #download-link-clicked:before { content: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiB3aWR0aD0iMS4yZW0iIGhlaWdodD0iMS4yZW0iIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTUsMjBIMTlWMThINU0xOSw5SDE1VjNIOVY5SDVMMTIsMTZMMTksOVoiIGZpbGw9InJnYig2NiwgMTMzLCAyNDQpIiAvPjwvc3ZnPg==); display: inline-block; margin-inline-end: 4px; vertical-align: -webkit-baseline-middle;}#download-link-clicked:before { width: 0px; opacity: 0;}.offline-content-suggestion-image { height: 35vw; line-height: 0; width: 35vw; flex-basis: 35vw; flex-grow: 0; flex-shrink: 0;}.offline-content-suggestion-image > img { border-bottom-left-radius: 15px; border-top-left-radius: 15px; height: 35vw; line-height: 0; width: 35vw;}.offline-content-suggestion-title { -webkit-box-orient: vertical; -webkit-line-clamp: 3; display: -webkit-box; margin: 5%; max-height: 65px; overflow: hidden; text-overflow: ellipsis;}.offline-content-suggestion-freshness, .offline-content-suggestion-attribution { color: #646464; display: inline-block; font-size: small; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}.offline-content-suggestion-attribution { margin-left: 5%; max-width: 35%; overflow: hidden; white-space: nowrap;}div.offline-content-suggestion { background-color: rgb(241, 243, 244); border-radius: 15px; display: flex; margin-bottom: 5%; margin-left: 0; margin-right: 0; margin-top: 5%;}#offline-content-summary { border-color: rgb(241, 243, 244); border-radius: 12px; border-style: solid; border-width: 1px; padding: 12px; text-align: center;}.offline-content-summary-image-truncate { width: 45px;}.offline-content-summary-images { direction: ltr; display: flex; margin-top: 10px; justify-content: center; padding-bottom: 12px;}.offline-content-summary-images img { background: rgb(241, 243, 244); border-radius: 50%; box-shadow: 0px 1px 2px 0px rgb(155, 155, 155), 0px 1px 3px 0px rgb(155, 155, 155); padding: 12px; width: 32px;}.offline-content-summary-description { border-top: 1px solid rgb(241, 243, 244); padding-top: 12px;}.offline-content-summary-action { padding-top: 12px;}/* Don't allow overflow when in a subframe. */html[subframe] body { overflow: hidden;}#sub-frame-error { -webkit-align-items: center; background-color: #DDD; display: -webkit-flex; -webkit-flex-flow: column; height: 100%; -webkit-justify-content: center; left: 0; position: absolute; text-align: center; top: 0; transition: background-color .2s ease-in-out; width: 100%;}#sub-frame-error:hover { background-color: #EEE;}#sub-frame-error .icon-generic { margin: 0 0 16px;}#sub-frame-error-details { margin: 0 10px; text-align: center; visibility: hidden;}/* Show details only when hovering. */#sub-frame-error:hover #sub-frame-error-details { visibility: visible;}/* If the iframe is too small, always hide the error code. *//* TODO(mmenke): See if overflow: no-display works better, once supported. */@media (max-width: 200px), (max-height: 95px) { #sub-frame-error-details { display: none; }}/* Adjust icon for small embedded frames in apps. */@media (max-height: 100px) { #sub-frame-error .icon-generic { height: auto; margin: 0; padding-top: 0; width: 25px; }}/* details-button is special; it's a <button> element that looks like a link. */#details-button { box-shadow: none; min-width: 0;}/* Styles for platform dependent separation of controls and details button. */.suggested-left > #control-buttons,.suggested-left #stale-load-button,.suggested-right > #details-button { float: left;}.suggested-right > #control-buttons,.suggested-right #stale-load-button,.suggested-left > #details-button { float: right;}.suggested-left .secondary-button { margin-inline-end: 0px; margin-inline-start: 16px;}#details-button.singular { float: none;}/* download-button shows both icon and text. */#download-button { height: 48px;}#download-button { box-shadow: none; position: relative;}#download-button:before { background: -webkit-image-set( url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAAO0lEQVQ4y2NgGArgPxIY1YChsOE/LtBAmpYG0mxpIOSDBpKUo2lpIDZxNJCkHKqlYZAla3RAHQ1DFgAARRroHyLNTwwAAAAASUVORK5CYII=) 1x, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAQAAAD9CzEMAAAAZElEQVRYw+3Ruw3AMAwDUY3OzZUmRRD4E9iim9wNwAdbEURHyk4AAAAATiCVK8lLyPsKeT9K3lsownnunfkPxO78hKiYHxBV8x2icr5BVM+/CMf8g3DN34Rzns6ViwHUAUQ/6wIAd5Km7l6c8AAAAABJRU5ErkJggg==) 2x) no-repeat; content: ''; display: inline-block; width: 24px; height: 24px; margin-inline-end: 4px; vertical-align: middle;}#download-button:disabled { background: rgb(180, 206, 249); color: rgb(255, 255, 255);}/*TODO(https://crbug.com/852872): UI for offline suggested content is incomplete.*/.suggested-thumbnail { width: 25vw; height: 25vw;}/* Alternate dino page button styles */#control-buttons .reload-button-alternate:disabled { background: #ccc; color: #fff; font-size: 14px; height: 48px;}#buttons::after { clear: both; content: ''; display: block; width: 100%;}/* Offline page */.offline { transition: -webkit-filter 1.5s cubic-bezier(0.65, 0.05, 0.36, 1), background-color 1.5s cubic-bezier(0.65, 0.05, 0.36, 1); will-change: -webkit-filter, background-color;}.offline #main-message > p { display: none;}.offline.inverted { -webkit-filter: invert(100%); background-color: #000;}.offline .interstitial-wrapper { color: #2b2b2b; font-size: 1em; line-height: 1.55; margin: 0 auto; max-width: 600px; padding-top: 100px; width: 100%;}.offline .runner-container { direction: ltr; height: 150px; max-width: 600px; overflow: hidden; position: absolute; top: 35px; width: 44px;}.offline .runner-canvas { height: 150px; max-width: 600px; opacity: 1; overflow: hidden; position: absolute; top: 0; z-index: 10;}.offline .controller { background: rgba(247,247,247, .1); height: 100vh; left: 0; position: absolute; top: 0; width: 100vw; z-index: 9;}#offline-resources { display: none;}@media (max-width: 420px) { .suggested-left > #control-buttons, .suggested-right > #control-buttons { float: none; } .snackbar { left: 0; bottom: 0; width: 100%; border-radius: 0; }}@media (max-height: 350px) { h1 { margin: 0 0 15px; } .icon-offline { margin: 0 0 10px; } .interstitial-wrapper { margin-top: 5%; } .nav-wrapper { margin-top: 30px; }}@media (min-width: 420px) and (max-width: 736px) and (min-height: 240px) and (max-height: 420px) and (orientation:landscape) { .interstitial-wrapper { margin-bottom: 100px; }}@media (max-width: 360px) and (max-height: 480px) { .offline .interstitial-wrapper { padding-top: 60px; } .offline .runner-container { top: 8px; }}@media (min-height: 240px) and (orientation: landscape) { .offline .interstitial-wrapper { margin-bottom: 90px; } .icon-offline { margin-bottom: 20px; }}@media (max-height: 320px) and (orientation: landscape) { .icon-offline { margin-bottom: 0; } .offline .runner-container { top: 10px; }}@media (max-width: 240px) { button { padding-left: 12px; padding-right: 12px; } .interstitial-wrapper { overflow: inherit; padding: 0 8px; }}@media (max-width: 120px) { button { width: auto; }}.arcade-mode,.arcade-mode .runner-container,.arcade-mode .runner-canvas { image-rendering: pixelated; max-width: 100%; overflow: hidden;}.arcade-mode #buttons,.arcade-mode #main-content { opacity: 0; overflow: hidden;}.arcade-mode .interstitial-wrapper { height: 100vh; max-width: 100%; overflow: hidden;}.arcade-mode .runner-container { left: 0; margin: auto; right: 0; transform-origin: top center; transition: transform 250ms cubic-bezier(0.4, 0.0, 1, 1) .4s; z-index: 2;} // Copyright 2017 The Chromium Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.// This is the shared code for security interstitials. It is used for both SSL// interstitials and Safe Browsing interstitials.// Should match security_interstitials::SecurityInterstitialCommand/** @enum| {string} */var SecurityInterstitialCommandId = { CMD_DONT_PROCEED: 0, CMD_PROCEED: 1, // Ways for user to get more information CMD_SHOW_MORE_SECTION: 2, CMD_OPEN_HELP_CENTER: 3, CMD_OPEN_DIAGNOSTIC: 4, // Primary button actions CMD_RELOAD: 5, CMD_OPEN_DATE_SETTINGS: 6, CMD_OPEN_LOGIN: 7, // Safe Browsing Extended Reporting CMD_DO_REPORT: 8, CMD_DONT_REPORT: 9, CMD_OPEN_REPORTING_PRIVACY: 10, CMD_OPEN_WHITEPAPER: 11, // Report a phishing error. CMD_REPORT_PHISHING_ERROR: 12};var HIDDEN_CLASS = 'hidden';/** * A convenience method for sending commands to the parent page. * @param {string} cmd The command to send. */function sendCommand(cmd) { if (window.certificateErrorPageController) { switch (cmd) { case SecurityInterstitialCommandId.CMD_DONT_PROCEED: certificateErrorPageController.dontProceed(); break; case SecurityInterstitialCommandId.CMD_PROCEED: certificateErrorPageController.proceed(); break; case SecurityInterstitialCommandId.CMD_SHOW_MORE_SECTION: certificateErrorPageController.showMoreSection(); break; case SecurityInterstitialCommandId.CMD_OPEN_HELP_CENTER: certificateErrorPageController.openHelpCenter(); break; case SecurityInterstitialCommandId.CMD_OPEN_DIAGNOSTIC: certificateErrorPageController.openDiagnostic(); break; case SecurityInterstitialCommandId.CMD_RELOAD: certificateErrorPageController.reload(); break; case SecurityInterstitialCommandId.CMD_OPEN_DATE_SETTINGS: certificateErrorPageController.openDateSettings(); break; case SecurityInterstitialCommandId.CMD_OPEN_LOGIN: certificateErrorPageController.openLogin(); break; case SecurityInterstitialCommandId.CMD_DO_REPORT: certificateErrorPageController.doReport(); break; case SecurityInterstitialCommandId.CMD_DONT_REPORT: certificateErrorPageController.dontReport(); break; case SecurityInterstitialCommandId.CMD_OPEN_REPORTING_PRIVACY: certificateErrorPageController.openReportingPrivacy(); break; case SecurityInterstitialCommandId.CMD_OPEN_WHITEPAPER: certificateErrorPageController.openWhitepaper(); break; case SecurityInterstitialCommandId.CMD_REPORT_PHISHING_ERROR: certificateErrorPageController.reportPhishingError(); break; } return; }// window.domAutomationController.send(cmd);// // }/** * Call this to stop clicks on <a href="#"> links from scrolling to the top of * the page (and possibly showing a # in the link). */function preventDefaultOnPoundLinkClicks() { document.addEventListener('click', function(e) { var anchor = findAncestor(/** @type {Node} */ (e.target), function(el) { return el.tagName == 'A'; }); // Use getAttribute() to prevent URL normalization. if (anchor && anchor.getAttribute('href') == '#') e.preventDefault(); });} // Copyright 2015 The Chromium Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.var mobileNav = false;/** * For small screen mobile the navigation buttons are moved * below the advanced text. */function onResize() { var helpOuterBox = document.querySelector('#details'); var mainContent = document.querySelector('#main-content'); var mediaQuery = '(min-width: 240px) and (max-width: 420px) and ' + '(min-height: 401px), ' + '(max-height: 560px) and (min-height: 240px) and ' + '(min-width: 421px)'; var detailsHidden = helpOuterBox.classList.contains(HIDDEN_CLASS); var runnerContainer = document.querySelector('.runner-container'); // Check for change in nav status. if (mobileNav != window.matchMedia(mediaQuery).matches) { mobileNav = !mobileNav; // Handle showing the top content / details sections according to state. if (mobileNav) { mainContent.classList.toggle(HIDDEN_CLASS, !detailsHidden); helpOuterBox.classList.toggle(HIDDEN_CLASS, detailsHidden); if (runnerContainer) { runnerContainer.classList.toggle(HIDDEN_CLASS, !detailsHidden); } } else if (!detailsHidden) { // Non mobile nav with visible details. mainContent.classList.remove(HIDDEN_CLASS); helpOuterBox.classList.remove(HIDDEN_CLASS); if (runnerContainer) { runnerContainer.classList.remove(HIDDEN_CLASS); } } }}function setupMobileNav() { window.addEventListener('resize', onResize); onResize();}document.addEventListener('DOMContentLoaded', setupMobileNav); // Copyright 2013 The Chromium Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.function toggleHelpBox() { var helpBoxOuter = document.getElementById('details'); helpBoxOuter.classList.toggle(HIDDEN_CLASS); var detailsButton = document.getElementById('details-button'); if (helpBoxOuter.classList.contains(HIDDEN_CLASS)) detailsButton.innerText = detailsButton.detailsText; else detailsButton.innerText = detailsButton.hideDetailsText; // Details appears over the main content on small screens. if (mobileNav) { document.getElementById('main-content').classList.toggle(HIDDEN_CLASS); var runnerContainer = document.querySelector('.runner-container'); if (runnerContainer) { runnerContainer.classList.toggle(HIDDEN_CLASS); } }}function diagnoseErrors() {// if (window.errorPageController) errorPageController.diagnoseErrorsButtonClick();// // }// Subframes use a different layout but the same html file. This is to make it// easier to support platforms that load the error page via different// mechanisms (Currently just iOS).if (window.top.location != window.location) document.documentElement.setAttribute('subframe', '');// Re-renders the error page using |strings| as the dictionary of values.// Used by NetErrorTabHelper to update DNS error pages with probe results.function updateForDnsProbe(strings) { var context = new JsEvalContext(strings); jstProcess(context, document.getElementById('t'));}// Given the classList property of an element, adds an icon class to the list// and removes the previously-function updateIconClass(classList, newClass) { var oldClass; if (classList.hasOwnProperty('last_icon_class')) { oldClass = classList['last_icon_class']; if (oldClass == newClass) return; } classList.add(newClass); if (oldClass !== undefined) classList.remove(oldClass); classList['last_icon_class'] = newClass; if (newClass == 'icon-offline') { document.body.classList.add('offline'); new Runner('.interstitial-wrapper'); } else { document.body.classList.add('neterror'); }}// Does a search using |baseSearchUrl| and the text in the search box.function search(baseSearchUrl) { var searchTextNode = document.getElementById('search-box'); document.location = baseSearchUrl + searchTextNode.value; return false;}// Use to track clicks on elements generated by the navigation correction// service. If |trackingId| is negative, the element does not come from the// correction service.function trackClick(trackingId) { // This can't be done with XHRs because XHRs are cancelled on navigation // start, and because these are cross-site requests. if (trackingId >= 0 && errorPageController) errorPageController.trackClick(trackingId);}// Called when an <a> tag generated by the navigation correction service is// clicked. Separate function from trackClick so the resources don't have to// be updated if new data is added to jstdata.function linkClicked(jstdata) { trackClick(jstdata.trackingId);}// Implements button clicks. This function is needed during the transition// between implementing these in trunk chromium and implementing them in// iOS.function reloadButtonClick(url) { if (window.errorPageController) { errorPageController.reloadButtonClick(); } else { location = url; }}function showSavedCopyButtonClick() { if (window.errorPageController) { errorPageController.showSavedCopyButtonClick(); }}function downloadButtonClick() { if (window.errorPageController) { errorPageController.downloadButtonClick(); var downloadButton = document.getElementById('download-button'); downloadButton.disabled = true; downloadButton.textContent = downloadButton.disabledText; document.getElementById('download-link-wrapper') .classList.add(HIDDEN_CLASS); document.getElementById('download-link-clicked-wrapper') .classList.remove(HIDDEN_CLASS); }}function detailsButtonClick() { if (window.errorPageController) errorPageController.detailsButtonClick();}/** * Replace the reload button with the Google cached copy suggestion. */function setUpCachedButton(buttonStrings) { var reloadButton = document.getElementById('reload-button'); reloadButton.textContent = buttonStrings.msg; var url = buttonStrings.cacheUrl; var trackingId = buttonStrings.trackingId; reloadButton.onclick = function(e) { e.preventDefault(); trackClick(trackingId); if (window.errorPageController) { errorPageController.trackCachedCopyButtonClick(); } location = url; }; reloadButton.style.display = ''; document.getElementById('control-buttons').hidden = false;}var primaryControlOnLeft = true;// function toggleErrorInformationPopup() { document.getElementById('error-information-popup-container') .classList.toggle(HIDDEN_CLASS);}function getSuggestedContentDiv(item) { var visual = ''; if (item.thumbnail_data_uri) { // html_inline.py will try to replace src attributes with data URIs using // a simple regex. The following is obfuscated slightly to avoid that. var src = 'src'; visual = `<img ${src}="${item.thumbnail_data_uri}">`; } return `<div class="offline-content-suggestion" onclick="launchOfflineItem('${item.ID}', '${item.name_space}')"> <div class="offline-content-suggestion-image">${visual}</div> <div> <div class="offline-content-suggestion-title">${item.title}</div> <span class="offline-content-suggestion-attribution">${ item.attribution }</span> <span class="offline-content-suggestion-freshness">${ item.date_modified }</span> </div></div>`;}function launchOfflineItem(itemID, name_space) { errorPageController.launchOfflineItem(itemID, name_space);}function launchDownloadsPage() { errorPageController.launchDownloadsPage();}// Populates a summary of suggested offline content.function offlineContentSummaryAvailable(summary) { if (!summary || !loadTimeData.valueExists('offlineContentSummary')) return; document.getElementById('offline-content-summary').hidden = false;}// Populates a list of suggested offline content.// TODO(https://crbug.com/852872): Finish implementing offline content list UI.function offlineContentAvailable(content) { if (!content || !loadTimeData.valueExists('offlineContentList')) return; var contentTitle = loadTimeData.getValue('offlineContentList').title; var contentOpenAllButton = loadTimeData.getValue('offlineContentList').actionText; var suggestionsHTML = []; suggestionsHTML.push(`<p style="text-align: center;">${contentTitle}</p>`); for (var c of content) suggestionsHTML.push(getSuggestedContentDiv(c)); suggestionsHTML.push(`<div> <a class="link-button" onclick="launchDownloadsPage()">${ contentOpenAllButton }</a></div>`); var offlineContentDiv = document.getElementById('offline-content-list'); offlineContentDiv.innerHTML = suggestionsHTML.join('n'); offlineContentDiv.hidden = false;}function onDocumentLoad() { var controlButtonDiv = document.getElementById('control-buttons'); var reloadButton = document.getElementById('reload-button'); var detailsButton = document.getElementById('details-button'); var showSavedCopyButton = document.getElementById('show-saved-copy-button'); var downloadButton = document.getElementById('download-button'); var reloadButtonVisible = loadTimeData.valueExists('reloadButton') && loadTimeData.getValue('reloadButton').msg; var showSavedCopyButtonVisible = loadTimeData.valueExists('showSavedCopyButton') && loadTimeData.getValue('showSavedCopyButton').msg; var downloadButtonVisible = loadTimeData.valueExists('downloadButton') && loadTimeData.getValue('downloadButton').msg; // If offline content suggestions will be visible, the usual buttons will not // be presented. var offlineContentVisible = loadTimeData.valueExists('suggestedOfflineContentPresentationMode'); if (offlineContentVisible) { document.querySelector('.nav-wrapper').classList.add(HIDDEN_CLASS); detailsButton.classList.add(HIDDEN_CLASS); if (downloadButtonVisible) document.getElementById('download-link').hidden = false; document.getElementById('download-links-wrapper') .classList.remove(HIDDEN_CLASS); document.getElementById('error-information-popup-container') .classList.add('use-popup-container', HIDDEN_CLASS) document.getElementById('error-information-button') .classList.remove(HIDDEN_CLASS); return; } var primaryButton, secondaryButton; if (showSavedCopyButton.primary) { primaryButton = showSavedCopyButton; secondaryButton = reloadButton; } else { primaryButton = reloadButton; secondaryButton = showSavedCopyButton; } // Sets up the proper button layout for the current platform. if (primaryControlOnLeft) { buttons.classList.add('suggested-left'); controlButtonDiv.insertBefore(secondaryButton, primaryButton); } else { buttons.classList.add('suggested-right'); controlButtonDiv.insertBefore(primaryButton, secondaryButton); } // Check for Google cached copy suggestion. if (loadTimeData.valueExists('cacheButton')) { setUpCachedButton(loadTimeData.getValue('cacheButton')); } if (reloadButton.style.display == 'none' && showSavedCopyButton.style.display == 'none' && downloadButton.style.display == 'none') { detailsButton.classList.add('singular'); } // Show control buttons. if (reloadButtonVisible || showSavedCopyButtonVisible || downloadButtonVisible) { controlButtonDiv.hidden = false; // Set the secondary button state in the cases of two call to actions. if ((reloadButtonVisible || downloadButtonVisible) && showSavedCopyButtonVisible) { secondaryButton.classList.add('secondary-button'); } }}document.addEventListener('DOMContentLoaded', onDocumentLoad); // Copyright (c) 2014 The Chromium Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.(function() {'use strict';/** * T-Rex runner. * @param {string} outerContainerId Outer containing element id. * @param {Object} opt_config * @constructor * @export */function Runner(outerContainerId, opt_config) { // Singleton if (Runner.instance_) { return Runner.instance_; } Runner.instance_ = this; this.outerContainerEl = document.querySelector(outerContainerId); this.containerEl = null; this.snackbarEl = null; this.config = opt_config || Runner.config; // Logical dimensions of the container. this.dimensions = Runner.defaultDimensions; this.canvas = null; this.canvasCtx = null; this.tRex = null; this.distanceMeter = null; this.distanceRan = 0; this.highestScore = 0; this.time = 0; this.runningTime = 0; this.msPerFrame = 1000 / FPS; this.currentSpeed = this.config.SPEED; this.obstacles = []; this.activated = false; // Whether the easter egg has been activated. this.playing = false; // Whether the game is currently in play state. this.crashed = false; this.paused = false; this.inverted = false; this.invertTimer = 0; this.resizeTimerId_ = null; this.bdayFlashTimer = null; this.playCount = 0; // Sound FX. this.audioBuffer = null; this.soundFx = {}; // Global web audio context for playing sounds. this.audioContext = null; // Images. this.images = {}; this.imagesLoaded = 0; if (this.isDisabled()) { this.setupDisabledRunner(); } else { this.loadImages(); }}window['Runner'] = Runner;/** * Default game width. * @const */var DEFAULT_WIDTH = 600;/** * Frames per second. * @const */var FPS = 60;/** @const */var IS_HIDPI = window.devicePixelRatio > 1;/** @const */var IS_IOS = /iPad|iPhone|iPod/.test(window.navigator.platform);/** @const */var IS_MOBILE = /Android/.test(window.navigator.userAgent) || IS_IOS;/** @const */var ARCADE_MODE_URL = 'chrome://dino/';/** * Default game configuration. * @enum {number} */Runner.config = { ACCELERATION: 0.001, BG_CLOUD_SPEED: 0.2, BOTTOM_PAD: 10, BOTTOM_PAD_BDAY: 26, BDAY_FLASH_DURATION: 1000, BDAY_Y_POS_ADJUST: 16, CLEAR_TIME: 3000, CLOUD_FREQUENCY: 0.5, GAMEOVER_CLEAR_TIME: 750, GAP_COEFFICIENT: 0.6, GRAVITY: 0.6, INITIAL_JUMP_VELOCITY: 12, INVERT_FADE_DURATION: 12000, INVERT_DISTANCE: 700, MAX_BLINK_COUNT: 3, MAX_CLOUDS: 6, MAX_OBSTACLE_LENGTH: 3, MAX_OBSTACLE_DUPLICATION: 2, MAX_SPEED: 13, MIN_JUMP_HEIGHT: 35, MOBILE_SPEED_COEFFICIENT: 1.2, RESOURCE_TEMPLATE_ID: 'audio-resources', SPEED: 6, SPEED_DROP_COEFFICIENT: 3, ARCADE_MODE_INITIAL_TOP_POSITION: 35, ARCADE_MODE_TOP_POSITION_PERCENT: 0.1};/** * Default dimensions. * @enum {string} */Runner.defaultDimensions = { WIDTH: DEFAULT_WIDTH, HEIGHT: 150};/** * CSS class names. * @enum {string} */Runner.classes = { ARCADE_MODE: 'arcade-mode', CANVAS: 'runner-canvas', CONTAINER: 'runner-container', CRASHED: 'crashed', ICON: 'icon-offline', INVERTED: 'inverted', SNACKBAR: 'snackbar', SNACKBAR_SHOW: 'snackbar-show', TOUCH_CONTROLLER: 'controller'};/** * Sprite definition layout of the spritesheet. * @enum {Object} */Runner.spriteDefinition = { LDPI: { BALLOON: {x: 417, y: 29}, CACTUS_LARGE: {x: 332, y: 2}, CACTUS_SMALL: {x: 228, y: 2}, CLOUD: {x: 86, y: 2}, HORIZON: {x: 2, y: 54}, MOON: {x: 484, y: 2}, PTERODACTYL: {x: 134, y: 2}, RESTART: {x: 2, y: 2}, TEXT_SPRITE: {x: 655, y: 2}, TREX: {x: 848, y: 2}, TREX_BDAY: {x: 0, y: 0}, SNACK: {x: 384, y: 22}, STAR: {x: 645, y: 2} }, HDPI: { BALLOON: {x: 834, y: 58}, CACTUS_LARGE: {x: 652, y: 2}, CACTUS_SMALL: {x: 446, y: 2}, CLOUD: {x: 166, y: 2}, HORIZON: {x: 2, y: 104}, MOON: {x: 954, y: 2}, PTERODACTYL: {x: 260, y: 2}, RESTART: {x: 2, y: 2}, TEXT_SPRITE: {x: 1294, y: 2}, TREX: {x: 1678, y: 2}, TREX_BDAY: {x: 0, y: 0}, SNACK: {x: 768, y: 44}, STAR: {x: 1276, y: 2} }};/** * Sound FX. Reference to the ID of the audio tag on interstitial page. * @enum {string} */Runner.sounds = { BUTTON_PRESS: 'offline-sound-press', HIT: 'offline-sound-hit', SCORE: 'offline-sound-reached'};/** * Key code mapping. * @enum {Object} */Runner.keycodes = { JUMP: {'38': 1, '32': 1}, // Up, spacebar DUCK: {'40': 1}, // Down RESTART: {'13': 1} // Enter};/** * Runner event names. * @enum {string} */Runner.events = { ANIM_END: 'webkitAnimationEnd', CLICK: 'click', KEYDOWN: 'keydown', KEYUP: 'keyup', POINTERDOWN: 'pointerdown', POINTERUP: 'pointerup', RESIZE: 'resize', TOUCHEND: 'touchend', TOUCHSTART: 'touchstart', VISIBILITY: 'visibilitychange', BLUR: 'blur', FOCUS: 'focus', LOAD: 'load'};Runner.prototype = { /** * Whether the easter egg has been disabled. CrOS enterprise enrolled devices. * @return {boolean} */ isDisabled: function() { return loadTimeData && loadTimeData.valueExists('disabledEasterEgg'); }, /** * For disabled instances, set up a snackbar with the disabled message. */ setupDisabledRunner: function() { this.containerEl = document.createElement('div'); this.containerEl.className = Runner.classes.SNACKBAR; this.containerEl.textContent = loadTimeData.getValue('disabledEasterEgg'); this.outerContainerEl.appendChild(this.containerEl); // Show notification when the activation key is pressed. document.addEventListener(Runner.events.KEYDOWN, function(e) { if (Runner.keycodes.JUMP[e.keyCode]) { this.containerEl.classList.add(Runner.classes.SNACKBAR_SHOW); document.querySelector('.icon').classList.add('icon-disabled'); } }.bind(this)); }, /** * Setting individual settings for debugging. * @param {string} setting * @param {*} value */ updateConfigSetting: function(setting, value) { if (setting in this.config && value != undefined) { this.config[setting] = value; switch (setting) { case 'GRAVITY': case 'MIN_JUMP_HEIGHT': case 'SPEED_DROP_COEFFICIENT': this.tRex.config[setting] = value; break; case 'INITIAL_JUMP_VELOCITY': this.tRex.setJumpVelocity(value); break; case 'SPEED': this.setSpeed(value); break; } } }, /** * Cache the appropriate image sprite from the page and get the sprite sheet * definition. */ loadImages: function() { if (IS_HIDPI) { Runner.imageSprite = document.getElementById('offline-resources-2x'); Runner.bdayImageSprite = document.getElementById('offline-resources-bday-2x'); this.spriteDef = Runner.spriteDefinition.HDPI; } else { Runner.imageSprite = document.getElementById('offline-resources-1x'); Runner.bdayImageSprite = document.getElementById('offline-resources-bday-1x'); this.spriteDef = Runner.spriteDefinition.LDPI; } if (Runner.imageSprite.complete) { this.init(); } else { // If the images are not yet loaded, add a listener. Runner.imageSprite.addEventListener(Runner.events.LOAD, this.init.bind(this)); } }, /** * Load and decode base 64 encoded sounds. */ loadSounds: function() { if (!IS_IOS) { this.audioContext = new AudioContext(); var resourceTemplate = document.getElementById(this.config.RESOURCE_TEMPLATE_ID).content; for (var sound in Runner.sounds) { var soundSrc = resourceTemplate.getElementById(Runner.sounds[sound]).src; soundSrc = soundSrc.substr(soundSrc.indexOf(',') + 1); var buffer = decodeBase64ToArrayBuffer(soundSrc); // Async, so no guarantee of order in array. this.audioContext.decodeAudioData(buffer, function(index, audioData) { this.soundFx[index] = audioData; }.bind(this, sound)); } } }, /** * Sets the game speed. Adjust the speed accordingly if on a smaller screen. * @param {number} opt_speed */ setSpeed: function(opt_speed) { var speed = opt_speed || this.currentSpeed; // Reduce the speed on smaller mobile screens. if (this.dimensions.WIDTH < DEFAULT_WIDTH) { var mobileSpeed = speed * this.dimensions.WIDTH / DEFAULT_WIDTH * this.config.MOBILE_SPEED_COEFFICIENT; this.currentSpeed = mobileSpeed > speed ? speed : mobileSpeed; } else if (opt_speed) { this.currentSpeed = opt_speed; } }, /** * Game initialiser. */ init: function() { // Hide the static icon. document.querySelector('.' + Runner.classes.ICON).style.visibility = 'hidden'; this.adjustDimensions(); this.setSpeed(); this.containerEl = document.createElement('div'); this.containerEl.className = Runner.classes.CONTAINER; // Player canvas container. this.canvas = createCanvas(this.containerEl, this.dimensions.WIDTH, this.dimensions.HEIGHT, Runner.classes.PLAYER); this.canvasCtx = this.canvas.getContext('2d'); this.canvasCtx.fillStyle = '#f7f7f7'; this.canvasCtx.fill(); Runner.updateCanvasScaling(this.canvas); // Horizon contains clouds, obstacles and the ground. this.horizon = new Horizon(this.canvas, this.spriteDef, this.dimensions, this.config.GAP_COEFFICIENT); // Distance meter this.distanceMeter = new DistanceMeter(this.canvas, this.spriteDef.TEXT_SPRITE, this.dimensions.WIDTH); // Draw t-rex this.tRex = new Trex(this.canvas, this.spriteDef.TREX); this.outerContainerEl.appendChild(this.containerEl); this.startListening(); this.update(); window.addEventListener(Runner.events.RESIZE, this.debounceResize.bind(this)); }, /** * Create the touch controller. A div that covers whole screen. */ createTouchController: function() { this.touchController = document.createElement('div'); this.touchController.className = Runner.classes.TOUCH_CONTROLLER; this.touchController.addEventListener(Runner.events.TOUCHSTART, this); this.touchController.addEventListener(Runner.events.TOUCHEND, this); }, /** * Debounce the resize event. */ debounceResize: function() { if (!this.resizeTimerId_) { this.resizeTimerId_ = setInterval(this.adjustDimensions.bind(this), 250); } }, /** * Adjust game space dimensions on resize. */ adjustDimensions: function() { clearInterval(this.resizeTimerId_); this.resizeTimerId_ = null; var boxStyles = window.getComputedStyle(this.outerContainerEl); var padding = Number(boxStyles.paddingLeft.substr(0, boxStyles.paddingLeft.length - 2)); this.dimensions.WIDTH = this.outerContainerEl.offsetWidth - padding * 2; if (this.isArcadeMode()) { this.dimensions.WIDTH = Math.min(DEFAULT_WIDTH, this.dimensions.WIDTH); if (this.activated) { this.setArcadeModeContainerScale(); } } // Redraw the elements back onto the canvas. if (this.canvas) { this.canvas.width = this.dimensions.WIDTH; this.canvas.height = this.dimensions.HEIGHT; Runner.updateCanvasScaling(this.canvas); this.distanceMeter.calcXPos(this.dimensions.WIDTH); this.clearCanvas(); this.horizon.update(0, 0, true); this.tRex.update(0); // Outer container and distance meter. if (this.playing || this.crashed || this.paused) { this.containerEl.style.width = this.dimensions.WIDTH + 'px'; this.containerEl.style.height = this.dimensions.HEIGHT + 'px'; this.distanceMeter.update(0, Math.ceil(this.distanceRan)); this.stop(); } else { this.tRex.draw(0, 0); } // Game over panel. if (this.crashed && this.gameOverPanel) { this.gameOverPanel.updateDimensions(this.dimensions.WIDTH); this.gameOverPanel.draw(); } } }, /** * Play the game intro. * Canvas container width expands out to the full width. */ playIntro: function() { if (!this.activated && !this.crashed) { this.playingIntro = true; this.tRex.playingIntro = true; // CSS animation definition. var keyframes = '@-webkit-keyframes intro { ' + 'from { width:' + Trex.config.WIDTH + 'px }' + 'to { width: ' + this.dimensions.WIDTH + 'px }' + '}'; document.styleSheets[0].insertRule(keyframes, 0); this.containerEl.addEventListener(Runner.events.ANIM_END, this.startGame.bind(this)); this.containerEl.style.webkitAnimation = 'intro .4s ease-out 1 both'; this.containerEl.style.width = this.dimensions.WIDTH + 'px'; if (this.touchController) { this.outerContainerEl.appendChild(this.touchController); } this.playing = true; this.activated = true; } else if (this.crashed) { this.restart(); } }, /** * Update the game status to started. */ startGame: function() { if (this.isArcadeMode()) { this.setArcadeMode(); } this.runningTime = 0; this.playingIntro = false; this.tRex.playingIntro = false; this.containerEl.style.webkitAnimation = ''; this.playCount++; // Handle tabbing off the page. Pause the current game. document.addEventListener(Runner.events.VISIBILITY, this.onVisibilityChange.bind(this)); window.addEventListener(Runner.events.BLUR, this.onVisibilityChange.bind(this)); window.addEventListener(Runner.events.FOCUS, this.onVisibilityChange.bind(this)); }, clearCanvas: function() { this.canvasCtx.clearRect(0, 0, this.dimensions.WIDTH, this.dimensions.HEIGHT); }, /** * Update the game frame and schedules the next one. */ update: function() { this.updatePending = false; var now = getTimeStamp(); var deltaTime = now - (this.time || now); // Flashing. if (this.bdayFlashTimer != null) { if (this.bdayFlashTimer <= 0) { this.bdayFlashTimer = null; this.tRex.setFlashing(false); this.tRex.enableBdayMode(this.spriteDef.TREX_BDAY); } else { this.bdayFlashTimer -= deltaTime; this.tRex.update(deltaTime); deltaTime = 0; } } this.time = now; if (this.playing) { this.clearCanvas(); if (this.tRex.jumping) { this.tRex.updateJump(deltaTime); } this.runningTime += deltaTime; var hasObstacles = this.runningTime > this.config.CLEAR_TIME; // First jump triggers the intro. if (this.tRex.jumpCount == 1 && !this.playingIntro) { this.playIntro(); } // The horizon doesn't move until the intro is over. if (this.playingIntro) { this.horizon.update(0, this.currentSpeed, hasObstacles); } else { deltaTime = !this.activated ? 0 : deltaTime; this.horizon.update(deltaTime, this.currentSpeed, hasObstacles, this.inverted); } // Check for collisions. var collision = hasObstacles && checkForCollision(this.horizon.obstacles[0], this.tRex); // Ate snack. if (Runner.isBdayModeEnabled() && collision && this.horizon.obstacles[0].typeConfig.type == 'SNACK') { this.horizon.enableBdayMode(); this.tRex.setFlashing(true); collision = false; this.bdayFlashTimer = this.config.BDAY_FLASH_DURATION; } if (!collision) { this.distanceRan += this.currentSpeed * deltaTime / this.msPerFrame; if (this.currentSpeed < this.config.MAX_SPEED) { this.currentSpeed += this.config.ACCELERATION; } } else { this.gameOver(); } var playAchievementSound = this.distanceMeter.update(deltaTime, Math.ceil(this.distanceRan)); if (playAchievementSound) { this.playSound(this.soundFx.SCORE); } // Night mode. if (this.invertTimer > this.config.INVERT_FADE_DURATION) { this.invertTimer = 0; this.invertTrigger = false; this.invert(); } else if (this.invertTimer) { this.invertTimer += deltaTime; } else { var actualDistance = this.distanceMeter.getActualDistance(Math.ceil(this.distanceRan)); if (actualDistance > 0) { this.invertTrigger = !(actualDistance % this.config.INVERT_DISTANCE); if (this.invertTrigger && this.invertTimer === 0) { this.invertTimer += deltaTime; this.invert(); } } } } if (this.playing || (!this.activated && this.tRex.blinkCount < Runner.config.MAX_BLINK_COUNT)) { this.tRex.update(deltaTime); this.scheduleNextUpdate(); } }, /** * Event handler. */ handleEvent: function(e) { return (function(evtType, events) { switch (evtType) { case events.KEYDOWN: case events.TOUCHSTART: case events.POINTERDOWN: this.onKeyDown(e); break; case events.KEYUP: case events.TOUCHEND: case events.POINTERUP: this.onKeyUp(e); break; } }.bind(this))(e.type, Runner.events); }, /** * Bind relevant key / mouse / touch listeners. */ startListening: function() { // Keys. document.addEventListener(Runner.events.KEYDOWN, this); document.addEventListener(Runner.events.KEYUP, this); // Touch / pointer. this.containerEl.addEventListener(Runner.events.TOUCHSTART, this); document.addEventListener(Runner.events.POINTERDOWN, this); document.addEventListener(Runner.events.POINTERUP, this); }, /** * Remove all listeners. */ stopListening: function() { document.removeEventListener(Runner.events.KEYDOWN, this); document.removeEventListener(Runner.events.KEYUP, this); if (this.touchController) { this.touchController.removeEventListener(Runner.events.TOUCHSTART, this); this.touchController.removeEventListener(Runner.events.TOUCHEND, this); } this.containerEl.removeEventListener(Runner.events.TOUCHSTART, this); document.removeEventListener(Runner.events.POINTERDOWN, this); document.removeEventListener(Runner.events.POINTERUP, this); }, /** * Process keydown. * @param {Event} e */ onKeyDown: function(e) { // Prevent native page scrolling whilst tapping on mobile. if (IS_MOBILE && this.playing) { e.preventDefault(); } if (!this.crashed && !this.paused) { if (Runner.keycodes.JUMP[e.keyCode] || e.type == Runner.events.TOUCHSTART) { e.preventDefault(); // Starting the game for the first time. if (!this.playing) { // Started by touch so create a touch controller. if (!this.touchController && e.type == Runner.events.TOUCHSTART) { this.createTouchController(); } this.loadSounds(); this.playing = true; this.update(); if (window.errorPageController) { errorPageController.trackEasterEgg(); } } // Start jump. if (!this.tRex.jumping && !this.tRex.ducking) { this.playSound(this.soundFx.BUTTON_PRESS); this.tRex.startJump(this.currentSpeed); } } else if (this.playing && Runner.keycodes.DUCK[e.keyCode]) { e.preventDefault(); if (this.tRex.jumping) { // Speed drop, activated only when jump key is not pressed. this.tRex.setSpeedDrop(); } else if (!this.tRex.jumping && !this.tRex.ducking) { // Duck. this.tRex.setDuck(true); } } } else if (this.crashed && e.type == Runner.events.TOUCHSTART && e.currentTarget == this.containerEl) { this.restart(); } }, /** * Process key up. * @param {Event} e */ onKeyUp: function(e) { var keyCode = String(e.keyCode); var isjumpKey = Runner.keycodes.JUMP[keyCode] || e.type == Runner.events.TOUCHEND || e.type == Runner.events.POINTERUP; if (this.isRunning() && isjumpKey) { this.tRex.endJump(); } else if (Runner.keycodes.DUCK[keyCode]) { this.tRex.speedDrop = false; this.tRex.setDuck(false); } else if (this.crashed) { // Check that enough time has elapsed before allowing jump key to restart. var deltaTime = getTimeStamp() - this.time; if (Runner.keycodes.RESTART[keyCode] || this.isLeftClickOnCanvas(e) || (deltaTime >= this.config.GAMEOVER_CLEAR_TIME && Runner.keycodes.JUMP[keyCode])) { this.restart(); } } else if (this.paused && isjumpKey) { // Reset the jump state this.tRex.reset(); this.play(); } }, /** * Returns whether the event was a left click on canvas. * On Windows right click is registered as a click. * @param {Event} e * @return {boolean} */ isLeftClickOnCanvas: function(e) { return e.button != null && e.button < 2 && e.type == Runner.events.POINTERUP && e.target == this.canvas; }, /** * RequestAnimationFrame wrapper. */ scheduleNextUpdate: function() { if (!this.updatePending) { this.updatePending = true; this.raqId = requestAnimationFrame(this.update.bind(this)); } }, /** * Whether the game is running. * @return {boolean} */ isRunning: function() { return !!this.raqId; }, /** * Game over state. */ gameOver: function() { this.playSound(this.soundFx.HIT); vibrate(200); this.stop(); this.crashed = true; this.distanceMeter.achievement = false; this.tRex.update(100, Trex.status.CRASHED); // Game over panel. if (!this.gameOverPanel) { this.gameOverPanel = new GameOverPanel(this.canvas, this.spriteDef.TEXT_SPRITE, this.spriteDef.RESTART, this.dimensions); } else { this.gameOverPanel.draw(); } // Update the high score. if (this.distanceRan > this.highestScore) { this.highestScore = Math.ceil(this.distanceRan); this.distanceMeter.setHighScore(this.highestScore); } // Reset the time clock. this.time = getTimeStamp(); }, stop: function() { this.playing = false; this.paused = true; cancelAnimationFrame(this.raqId); this.raqId = 0; }, play: function() { if (!this.crashed) { this.playing = true; this.paused = false; this.tRex.update(0, Trex.status.RUNNING); this.time = getTimeStamp(); this.update(); } }, restart: function() { if (!this.raqId) { this.playCount++; this.runningTime = 0; this.playing = true; this.paused = false; this.crashed = false; this.distanceRan = 0; this.setSpeed(this.config.SPEED); this.time = getTimeStamp(); this.containerEl.classList.remove(Runner.classes.CRASHED); this.clearCanvas(); this.distanceMeter.reset(this.highestScore); this.horizon.reset(); this.tRex.reset(); this.playSound(this.soundFx.BUTTON_PRESS); this.invert(true); this.bdayFlashTimer = null; this.update(); } }, /** * Whether the game should go into arcade mode. * @return {boolean} */ isArcadeMode: function() { return document.title == ARCADE_MODE_URL; }, /** * Hides offline messaging for a fullscreen game only experience. */ setArcadeMode: function() { document.body.classList.add(Runner.classes.ARCADE_MODE); this.setArcadeModeContainerScale(); }, /** * Sets the scaling for arcade mode. */ setArcadeModeContainerScale: function() { var windowHeight = window.innerHeight; var scaleHeight = windowHeight / this.dimensions.HEIGHT; var scaleWidth = window.innerWidth / this.dimensions.WIDTH; var scale = Math.max(1, Math.min(scaleHeight, scaleWidth)); var scaledCanvasHeight = this.dimensions.HEIGHT * scale; // Positions the game container at 10% of the available vertical window // height minus the game container height. var translateY = Math.ceil(Math.max(0, (windowHeight - scaledCanvasHeight - Runner.config.ARCADE_MODE_INITIAL_TOP_POSITION) * Runner.config.ARCADE_MODE_TOP_POSITION_PERCENT)) * window.devicePixelRatio; this.containerEl.style.transform = 'scale(' + scale + ') translateY(' + translateY + 'px)'; }


[未上市股票投資達人]
  • 本週未上市股票推薦比賽<未上市達人>出爐:
  • 第一名 家棟 未上市股票:寶德能源 漲幅: 89.27%
  • 第二名 無相 未上市股票:康全電訊 漲幅: 85.33%
  • 第三名 Ray chen 未上市股票:力智電子 漲幅: 81.54%
  • 第四名 陳 未上市股票:太電 漲幅: 70.80%
  • 第五名 更 未上市股票:力晶科技 漲幅: 61.36%