Загрузка данных
Windows PowerShell 5.1
(C) Корпорация Майкрософт (Microsoft Corporation). Все права защищены.
PS C:\Users\str> $root = 'C:\Temp\pepper42-build\wgt-staging'
PS C:\Users\str> $js = Join-Path $root 'static\js'
PS C:\Users\str>
PS C:\Users\str> function Show-Section {
>> param(
>> [string]$File,
>> [string]$Pattern,
>> [int]$Before = 5,
>> [int]$After = 35
>> )
>>
>> $path = Join-Path $root $File
>> $lines = Get-Content -LiteralPath $path -Encoding UTF8
>>
>> $hits = Select-String -LiteralPath $path -Pattern $Pattern
>>
>> foreach ($hit in $hits) {
>> $start = [Math]::Max(0, $hit.LineNumber - 1 - $Before)
>> $end = [Math]::Min($lines.Count - 1, $hit.LineNumber - 1 + $After)
>>
>> Write-Host "`n===== $File : строка $($hit.LineNumber) =====" -ForegroundColor Cyan
>>
>> for ($i = $start; $i -le $end; $i++) {
>> '{0,5}: {1}' -f ($i + 1), $lines[$i]
>> }
>> }
>> }
PS C:\Users\str>
PS C:\Users\str> Write-Host "`n========== CSS: ПОЛНОСТЬЮ ==========" -ForegroundColor Yellow
========== CSS: ПОЛНОСТЬЮ ==========
PS C:\Users\str> Get-Content -LiteralPath (Join-Path $root 'static\css\style.css') -Encoding UTF8
body {
background-color: #282C38;
color: #fff;
font-family: 'Roboto', sans-serif;
}
.page-title {
font-weight: 300;
font-size: 26px;
margin-top: 20px;
margin-bottom: 30px;
width: 100%;
text-align: center;
}
span.mdl-layout-title {
font-weight: 300;
}
span.mdl-layout-title > span {
font-weight: 900;
color: #00A3C6;
}
.mdl-layout__header-row {
padding: 0 80px 0 80px;
}
main {
padding: 0 80px 0 80px;
}
@media screen and (max-width: 600px) {
#host-grid .mdl-card {
-webkit-flex-basis: 50% !important;
flex-basis: 50% !important;
}
#game-grid .mdl-card {
height: 100px !important;
width: 75px !important;
}
}
@media screen and (min-width: 600px) and (max-width: 800px) {
#host-grid .mdl-card {
-webkit-flex-basis: 33% !important;
flex-basis: 33% !important;
}
#game-grid .mdl-card {
height: 150px !important;
width: 112.5px !important;
}
}
@media screen and (min-width: 800px) and (max-width: 1024px) {
main {
padding: 0 72px 0 72px !important;
}
.mdl-layout__header-row {
padding: 0 72px 0 72px !important;
}
#host-grid .mdl-card {
-webkit-flex-basis: 25% !important;
flex-basis: 25% !important;
}
#game-grid .mdl-card {
height: 200px !important;
width: 150px !important;
}
}
@media screen and (min-width: 1024px) {
#game-grid .mdl-card {
height: 300px !important;
width: 225px !important;
}
}
.nav-menu-parent {
position: relative;
margin: 0 4px;
}
.mdl-menu__outline {
background-color: #333846;
color: white;
}
.mdl-menu__item {
color: white;
}
.mdl-menu__item:hover, .mdl-menu__item.hovered, .mdl-menu__item:focus {
background-color: #00A3C6;
}
#bitrateField {
width: 100px;
height: 36px;
overflow: hidden;
text-transform: none;
}
.bitrateMenu {
width: 170px;
}
.mdl-button {
color: #fff !important;
}
.mdl-grid {
width: 100%;
}
.mdl-cell {
text-align: center;
color:#fff;
padding:25px;
}
#backIcon {
position: fixed;
left: 28px;
}
#backIcon:hover {
cursor: pointer;
}
.mdl-dialog {
width: 400px;
background-color: #333846;
color: white;
}
.mdl-dialog__title {
padding: 24px 24px 0;
margin: 0;
font-size: 2.5rem;
}
.mdl-dialog__content {
padding: 20px 24px 24px 24px;
color: rgba(255, 255, 255, 0.90);
}
.mdl-textfield__input {
border-bottom: 1px solid rgba(255, 255, 255, 0.90);
}
.mdl-textfield__label {
color: rgba(255, 255, 255, 0.90);
}
#naclSpinner {
display: none;
z-index: 2;
position: fixed;
left: 50%;
bottom: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
margin: 0 auto;
text-align: center;
}
#loadingSpinner {
display: none;
z-index: 1;
position: fixed;
left: 50%;
bottom: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
margin: 0 auto;
color: white;
text-align: center;
}
#snackButton {
width: 0px;
height: 0px;
display: none;
}
.mdl-snackbar__text {
padding: 14px 30px 14px 30px;
}
.mdl-snackbar {
min-width:0px;
}
/* TIZEN24_WEBKIT_PREFIXES */
#host-grid, #game-grid {
padding: 0;
margin: 0;
-webkit-flex: 1;
flex: 1;
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: center;
justify-content: center;
}
#host-grid .mdl-card {
-webkit-flex-basis: 15%;
flex-basis: 15%;
}
#game-grid .mdl-card {
position: relative;
background: url('../res/placeholder_game.svg') rgba(29, 29, 29, 1) center/cover no-repeat;
}
#host-grid .mdl-card, #game-grid .mdl-card {
text-align: center;
width: 170px;
height: 170px;
min-height: 170px;
margin: 15px;
cursor: pointer;
-webkit-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
will-change: transform;
}
#host-grid .mdl-card:hover, #host-grid .mdl-card:focus, #host-grid .mdl-card:active, #game-grid .mdl-card:focus, #game-grid .mdl-card:active {
-webkit-transform: scale(1.15);
transform: scale(1.15);
outline : #00A3C6 solid 2px;;
}
#host-grid .mdl-card__title {
padding: 0;
}
#host-grid .mdl-card__title .mdl-card__title-text {
width: 100%;
font-size: 14px;
padding: 10px 15px;
background-color: rgba(0,0,0,0.7);
}
#game-grid .mdl-card img {
height: 100%;
width: 100%;
opacity: 0;
-webkit-transition: opacity .3s;
transition: opacity .3s;
z-index: -1;
}
#game-grid .mdl-card img.fade-in {
opacity: 1;
}
#game-grid .game-title {
position: absolute;
bottom: 0;
min-height: 20px;
font-size: 13px;
font-weight: 300;
padding: 5px 0;
width: 100%;
color: white;
text-align: center;
background-color: rgba(0, 0, 0, 0.6);
}
#game-grid .game-title span {
padding: 0 10px;
}
.add-host-card > .mdl-card__title {
color: #fff;
background:
url('../res/ic_add_to_queue_white_48px.svg') center no-repeat #3E4454;
}
.host-container > .mdl-card__title {
color: #fff;
background:
url('../res/ic_tv_white_48px.svg') center no-repeat #3E4454;
}
.mdl-card.hovered {
background-color: initial;
outline: #00A3C6 solid 2px;
-webkit-transform: scale(1.15);
transform: scale(1.15);
}
#host-grid p {
margin: 0;
}
#host-grid .mdl-textfield {
width: 200px;
margin-right: 20px;
margin-bottom: 0px;
}
#host-grid #GFEHostIPField {
padding-bottom: 0px;
}
#host-grid #selectHost {
padding: 0px;
line-height: 20px;
height: 20px;
margin-top: 10px;
margin-bottom: 10px;
margin-right: 20px;
background: none;
}
#host-grid .button-holder {
padding: 0px;
margin-top: 10px;
margin-bottom: 10px;
}
.remove-host {
position:absolute;
right:5px;
top:5px;
width:24px;
height:24px;
z-index: 5;
background-image: url('../res/ic_remove_circle_outline_white_48px.svg');
background-repeat: no-repeat;
background-size: 20px 20px;
background-position: center;
border: 0;
cursor: pointer;
}
/*.remove-host:hover, .remove-host:focus {
background-image: url('\\static\\res\\ic_remove_circle_white_24px.svg');
}*/
#pairButton {
margin: 3px;
}
#showAppsButton {
margin: 3px;
}
#listener {
overflow: hidden;
margin-top: 0px;
height: 0px;
}
.fullscreen {
height: 100vh !important;
overflow: hidden !important;
margin: auto !important;
padding: 0 !important;
border: none !important;
}
.current-game {
outline: auto #8BC34A;
}
.host-cell-inactive {
outline: auto #F44336;
}
.host-cell:hover {
cursor: pointer;
color: #000 !important;
}
.cancel-current:hover {
cursor: pointer;
}
.cancel-current {
border: 2px solid white;
padding: 5px;
border-radius: 5px;
}
.cancel-current img {
margin-right: 5px;
}
.cancel-current .game-title {
color: #fff;
}
#nacl_module {
cursor: none;
}
PS C:\Users\str>
PS C:\Users\str> Write-Host "`n========== HTML: HEAD И НАЧАЛО BODY ==========" -ForegroundColor Yellow
========== HTML: HEAD И НАЧАЛО BODY ==========
PS C:\Users\str> $html = Get-Content -LiteralPath (Join-Path $root 'index.html') -Encoding UTF8
PS C:\Users\str> for ($i = 0; $i -lt [Math]::Min(45, $html.Count); $i++) {
>> '{0,4}: {1}' -f ($i + 1), $html[$i]
>> }
1: <!DOCTYPE html>
2: <html>
3: <head>
4: <meta http-equiv="Pragma" content="no-cache">
5: <meta http-equiv="Expires" content="-1">
6: <meta name="viewport" content="width=device-width, initial-scale=1.0">
7: <title>Moonlight</title>
8: <link rel="stylesheet" href="static/css/roboto.css">
9: <link rel="stylesheet" href="static/css/material.min.css">
10: <link rel="stylesheet" href="static/css/style.css">
11: <link rel="stylesheet" href="static/css/material-icons.css">
12: <script type="text/javascript" src="static/js/platform.js"></script>
13: </head>
14: <body data-name="moonlight-chrome" data-tools="pnacl" data-configs="Debug Release" data-path="{tc}/{config}">
15: <div id="eventAnchor" tabindex="0" style="position:absolute;left:0;top:0;width:1px;height:1px;opacity:0;"></div>
16: <div class="mdl-layout mdl-js-layout">
17: <header id="main-navigation" class="mdl-layout__header mdl-layout__header--transparent">
18: <div class="mdl-layout__header-row">
19: <button id="backIcon" class="mdl-button mdl-js-button mdl-button--icon" role="link" aria-label="Host selection"><i class="material-icons">keyboard_arrow_left</i></button>
20: <!-- Title -->
21: <span class="mdl-layout-title">MOON<span>LIGHT</span></span>
22: <!-- Add spacer, to align navigation to the right -->
23: <div class="mdl-layout-spacer"></div>
24: <!-- Navigation -->
25: <nav class="mdl-navigation">
26: <div class="nav-menu-parent">
27: <div id="resolutionMenu">
28: <button id="selectResolution" data-value="1280:720" class="mdl-button mdl-js-button">
29: 720p
30: </button>
31: </div>
32:
33: <ul class="resolutionMenu mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect" for="selectResolution">
34: <li class="mdl-menu__item" data-value="858:480">480p</li>
35: <li class="mdl-menu__item" data-value="1280:720">720p</li>
36: <li class="mdl-menu__item" data-value="1920:1080">1080p</li>
37: <li class="mdl-menu__item" data-value="2560:1440">1440p</li>
38: <li class="mdl-menu__item" data-value="3840:2160">4K</li>
39: </ul>
40:
41: <div id="resolutionTooltip" class="mdl-tooltip" for="resolutionMenu">
42: Resolution
43: </div>
44: </div>
45: <div class="nav-menu-parent">
PS C:\Users\str>
PS C:\Users\str> Write-Host "`n========== COMMON: СОЗДАНИЕ NACL ==========" -ForegroundColor Yellow
========== COMMON: СОЗДАНИЕ NACL ==========
PS C:\Users\str> Show-Section 'static\js\common.js' 'function createNaClModule' 3 100
===== static\js\common.js : строка 71 =====
68: * @param {number} height The height to create the plugin.
69: * @param {Object} attrs Dictionary of attributes to set on the module.
70: */
71: function createNaClModule(name, tool, path, width, height, attrs) {
72: console.log('Parameters:', name, tool, path, width, height, attrs);
73: var moduleEl = document.createElement('embed');
74: moduleEl.setAttribute('name', 'nacl_module');
75: moduleEl.setAttribute('id', 'nacl_module');
76: moduleEl.setAttribute('width', width);
77: moduleEl.setAttribute('height', height);
78: moduleEl.setAttribute('path', path);
79: moduleEl.setAttribute('src', path + '/' + name + '.nmf');
80:
81: // Add any optional arguments
82: if (attrs) {
83: for (var key in attrs) {
84: moduleEl.setAttribute(key, attrs[key]);
85: console.log('After setting ' + key + ':', moduleEl);
86: }
87: }
88: var mimetype = mimeTypeForTool(tool);
89: moduleEl.setAttribute('type', mimetype);
90: console.log('%c[createNaClModule, common.js]', 'color: gray;', "moduleEl: " + moduleEl.outerHTML);
91:
92: // The <EMBED> element is wrapped inside a <DIV>, which has both a 'load'
93: // and a 'message' event listener attached. This wrapping method is used
94: // instead of attaching the event listeners directly to the <EMBED> element
95: // to ensure that the listeners are active before the NaCl module 'load'
96: // event fires.
97: var listenerDiv = document.getElementById('listener');
98: listenerDiv.appendChild(moduleEl);
99:
100: // Request the offsetTop property to force a relayout. As of Apr 10, 2014
101: // this is needed if the module is being loaded on a Chrome App's
102: // background page (see crbug.com/350445).
103: moduleEl.offsetTop;
104:
105: // Host plugins don't send a moduleDidLoad message. We'll fake it here.
106: var isHost = isHostToolchain(tool);
107: if (isHost) {
108: window.setTimeout(function () {
109: moduleEl.readyState = 1;
110: moduleEl.dispatchEvent(new CustomEvent('loadstart'));
111: moduleEl.readyState = 4;
112: moduleEl.dispatchEvent(new CustomEvent('load'));
113: moduleEl.dispatchEvent(new CustomEvent('loadend'));
114: }, 100); // 100 ms
115: }
116: }
117:
118: /**
119: * Add the default "load" and "message" event listeners to the element with
120: * id "listener".
121: *
122: * The "load" event is sent when the module is successfully loaded. The
123: * "message" event is sent when the naclModule posts a message using
124: * PPB_Messaging.PostMessage() (in C) or pp::Instance().PostMessage() (in
125: * C++).
126: */
127: function attachDefaultListeners() {
128: var listenerDiv = document.getElementById('listener');
129: listenerDiv.addEventListener('load', moduleDidLoad, true);
130: listenerDiv.addEventListener('message', handleMessage, true);
131: listenerDiv.addEventListener('error', handleError, true);
132: listenerDiv.addEventListener('crash', handleCrash, true);
133: if (typeof window.attachListeners !== 'undefined') {
134: window.attachListeners();
135: }
136: }
137:
138: /**
139: * Called when the NaCl module fails to load.
140: *
141: * This event listener is registered in createNaClModule above.
142: */
143: function handleError(event) {
144: // We can't use common.naclModule yet because the module has not been
145: // loaded.
146: console.log('%c[handleError, common.js]', 'color: red;', event);
147: var moduleEl = document.getElementById('nacl_module');
148: updateStatus('ERROR [' + moduleEl.lastError + ']');
149: }
150:
151: /**
152: * Called when the Browser can not communicate with the Module
153: *
154: * This event listener is registered in attachDefaultListeners above.
155: */
156: function handleCrash(event) {
157: console.log('%c[handleCrash, common.js]', 'color: red;', event);
158: if (common.naclModule.exitStatus == -1) {
159: updateStatus('CRASHED');
160: } else {
161: updateStatus('EXITED [' + common.naclModule.exitStatus + ']');
162: }
163: if (typeof window.handleCrash !== 'undefined') {
164: window.handleCrash(common.naclModule.lastError);
165: }
166: }
167:
168: /**
169: * Called when the NaCl module is loaded.
170: *
171: * This event listener is registered in attachDefaultListeners above.
PS C:\Users\str> Show-Section 'static\js\common.js' 'function domContentLoaded' 3 65
===== static\js\common.js : строка 283 =====
280: * @param {number} height The height to create the plugin.
281: * @param {Object} attrs Optional dictionary of additional attributes.
282: */
283: function domContentLoaded(name, tool, path, width, height, attrs) {
284: // If the page loads before the Native Client module loads, then set the
285: // status message indicating that the module is still loading. Otherwise,
286: // do not change the status message.
287: updateStatus('Page loaded.');
288: if (!browserSupportsNaCl(tool)) {
289: updateStatus('Browser does not support NaCl (' + tool + '), or NaCl is disabled');
290: } else if (common.naclModule == null) {
291: updateStatus('Browser supports NaCl (' + tool + ')');
292: updateStatus('Creating embed: ' + tool);
293:
294: // We use a non-zero sized embed to give Chrome space to place the bad
295: // plug-in graphic, if there is a problem.
296: width = typeof width !== 'undefined' ? width : 200;
297: height = typeof height !== 'undefined' ? height : 200;
298: attachDefaultListeners();
299: createNaClModule(name, tool, path, width, height, attrs);
300: } else {
301: // It's possible that the Native Client module onload event fired
302: // before the page's onload event. In this case, the status message
303: // will reflect 'SUCCESS', but won't be displayed. This call will
304: // display the current message.
305: updateStatus('Waiting.');
306: }
307: }
308:
309: /** Saved text to display in the element with id 'statusField'. */
310: var statusText = 'NO-STATUSES';
311:
312: /**
313: * Set the global status message. If the element with id 'statusField'
314: * exists, then set its HTML to the status message as well.
315: *
316: * @param {string} opt_message The message to set. If null or undefined, then
317: * set element 'statusField' to the message from the last call to
318: * updateStatus.
319: */
320: function updateStatus(opt_message) {
321: if (opt_message) {
322: statusText = opt_message;
323: console.log('%c[updateStatus, common.js]', 'color: gray;', statusText);
324: }
325: var statusField = document.getElementById('statusField');
326: if (statusField) {
327: statusField.innerHTML = statusText;
328: }
329: }
330:
331: // The symbols to export.
332: return {
333: /** A reference to the NaCl module, once it is loaded. */
334: naclModule: null,
335: attachDefaultListeners: attachDefaultListeners,
336: domContentLoaded: domContentLoaded,
337: createNaClModule: createNaClModule,
338: hideModule: hideModule,
339: removeModule: removeModule,
340: logMessage: logMessage,
341: updateStatus: updateStatus
342: };
343: }();
344:
345: // Listen for the DOM content to be loaded. This event is fired when parsing of
346: // the page's document has finished.
347: // TIZEN24_DATA_ATTRIBUTE_FALLBACK
348: document.addEventListener('DOMContentLoaded', function () {
PS C:\Users\str> Show-Section 'static\js\common.js' 'function browserSupportsNaCl' 3 35
===== static\js\common.js : строка 47 =====
44: * @return {bool} True if the browser supports the type of NaCl plugin
45: * produced by the given toolchain.
46: */
47: function browserSupportsNaCl(tool) {
48: // Assume host toolchains always work with the given browser.
49: // The below mime-type checking might not work with
50: // --register-pepper-plugins.
51: if (isHostToolchain(tool)) {
52: return true;
53: }
54: console.log('%c[browserSupportsNaCl, common.js]', 'color: gray;', 'is NOT host toolchain for tool: ' + tool);
55: var mimetype = mimeTypeForTool(tool);
56: console.log('%c[browserSupportsNaCl, common.js]', 'color: gray;', 'mimetypes: ' + mimetype);
57: return navigator.mimeTypes[mimetype] !== undefined;
58: }
59:
60: /**
61: * Create the Native Client <embed> element as a child of the DOM element
62: * named "listener".
63: *
64: * @param {string} name The name of the example.
65: * @param {string} tool The name of the toolchain, e.g. "glibc", "newlib" etc.
66: * @param {string} path Directory name where .nmf file can be found.
67: * @param {number} width The width to create the plugin.
68: * @param {number} height The height to create the plugin.
69: * @param {Object} attrs Dictionary of attributes to set on the module.
70: */
71: function createNaClModule(name, tool, path, width, height, attrs) {
72: console.log('Parameters:', name, tool, path, width, height, attrs);
73: var moduleEl = document.createElement('embed');
74: moduleEl.setAttribute('name', 'nacl_module');
75: moduleEl.setAttribute('id', 'nacl_module');
76: moduleEl.setAttribute('width', width);
77: moduleEl.setAttribute('height', height);
78: moduleEl.setAttribute('path', path);
79: moduleEl.setAttribute('src', path + '/' + name + '.nmf');
80:
81: // Add any optional arguments
82: if (attrs) {
PS C:\Users\str>
PS C:\Users\str> Write-Host "`n========== INDEX: ЗАПУСК И ИНИЦИАЛИЗАЦИЯ ==========" -ForegroundColor Yellow
========== INDEX: ЗАПУСК И ИНИЦИАЛИЗАЦИЯ ==========
PS C:\Users\str> Show-Section 'static\js\index.js' 'function onWindowLoad' 5 100
===== static\js\index.js : строка 1166 =====
1161: onKeydownListener: remoteControllerHandler
1162: };
1163: console.log('Initializing SamsungTV platform');
1164: platformOnLoad(handler);
1165: }
1166: function onWindowLoad() {
1167: console.log('%c[index.js]', 'color: green;', 'Moonlight\'s main window loaded');
1168: // don't show the game selection div
1169: $('#gameSelection').css('display', 'none');
1170: console.log('load stored resolution prefs');
1171: getData('resolution', function (previousValue) {
1172: if (previousValue.resolution != null) {
1173: $('.resolutionMenu li').each(function () {
1174: if ($(this).data('value') === previousValue.resolution) {
1175: $('#selectResolution').text($(this).text()).data('value', previousValue.resolution);
1176: }
1177: });
1178: }
1179: });
1180: console.log('Load stored remote audio prefs');
1181: getData('remoteAudio', function (previousValue) {
1182: if (previousValue.remoteAudio == null) {
1183: document.querySelector('#externalAudioBtn').MaterialIconToggle.uncheck();
1184: } else if (previousValue.remoteAudio == false) {
1185: document.querySelector('#externalAudioBtn').MaterialIconToggle.uncheck();
1186: } else {
1187: document.querySelector('#externalAudioBtn').MaterialIconToggle.check();
1188: }
1189: });
1190: console.log('load stored framerate prefs');
1191: getData('frameRate', function (previousValue) {
1192: if (previousValue.frameRate != null) {
1193: $('.framerateMenu li').each(function () {
1194: if ($(this).data('value') === previousValue.frameRate) {
1195: $('#selectFramerate').text($(this).text()).data('value', previousValue.frameRate);
1196: }
1197: });
1198: }
1199: });
1200: console.log('load stored optimization prefs');
1201: getData('optimize', function (previousValue) {
1202: if (previousValue.optimize == null) {
1203: document.querySelector('#optimizeGamesBtn').MaterialIconToggle.check();
1204: } else if (previousValue.optimize == false) {
1205: document.querySelector('#optimizeGamesBtn').MaterialIconToggle.uncheck();
1206: } else {
1207: document.querySelector('#optimizeGamesBtn').MaterialIconToggle.check();
1208: }
1209: });
1210: console.log('load stored bitrate prefs');
1211: getData('bitrate', function (previousValue) {
1212: $('#bitrateSlider')[0].MaterialSlider.change(previousValue.bitrate != null ? previousValue.bitrate : '20');
1213: updateBitrateField();
1214: });
1215: initSamsungKeys();
1216: }
1217: window.onload = onWindowLoad;
1218:
1219: // Required on TizenTV, to get gamepad events.
1220: window.addEventListener('gamepadconnected', function (event) {
1221: var connectedGamepad = event.gamepad;
1222: console.log('%c[index.js, gamepadconnected] gamepad connected: ', 'color: green;', connectedGamepad);
1223: if (connectedGamepad.vibrationActuator) {
1224: // Check if the gamepad supports rumble
1225: console.log('Gamepad supports vibration.');
1226: connectedGamepad.vibrationActuator.playEffect('dual-rumble', {
1227: duration: 1000,
1228: strongMagnitude: 1.0,
1229: weakMagnitude: 1.0
1230: });
1231: } else {
1232: console.log('Gamepad does not support vibration.');
1233: }
1234: });
1235: window.addEventListener('gamepaddisconnected', function (event) {
1236: console.log('%c[index.js, gamepaddisconnected] gamepad disconnected: ' + JSON.stringify(event.gamepad), event.gamepad);
1237: });
PS C:\Users\str> Show-Section 'static\js\index.js' 'function initSamsungKeys' 3 35
===== static\js\index.js : строка 1137 =====
1134: updateBitrateField();
1135: saveBitrate();
1136: }
1137: function initSamsungKeys() {
1138: console.log('initializing keys');
1139: var handler = {
1140: initRemoteController: true,
1141: buttonsToRegister: [
1142: // https://developer.samsung.com/tv/develop/guides/user-interaction/keyboardime
1143: 'ColorF0Red',
1144: // F1
1145: 'ColorF1Green',
1146: // F2
1147: 'ColorF2Yellow',
1148: // F3
1149: 'ColorF3Blue',
1150: // F4
1151: // Not working...
1152: //'SmartHub', // F5
1153: 'Source',
1154: // F6
1155: 'ChannelList',
1156: // F7
1157: 'ChannelDown',
1158: // F11
1159: 'ChannelUp' // F12
1160: ],
1161: onKeydownListener: remoteControllerHandler
1162: };
1163: console.log('Initializing SamsungTV platform');
1164: platformOnLoad(handler);
1165: }
1166: function onWindowLoad() {
1167: console.log('%c[index.js]', 'color: green;', 'Moonlight\'s main window loaded');
1168: // don't show the game selection div
1169: $('#gameSelection').css('display', 'none');
1170: console.log('load stored resolution prefs');
1171: getData('resolution', function (previousValue) {
1172: if (previousValue.resolution != null) {
PS C:\Users\str> Show-Section 'static\js\index.js' 'function remoteControllerHandler' 3 100
PS C:\Users\str>
PS C:\Users\str> Write-Host "`n========== РАЗМЕРЫ И VIEWPORT В ПРОЕКТЕ ==========" -ForegroundColor Yellow
========== РАЗМЕРЫ И VIEWPORT В ПРОЕКТЕ ==========
PS C:\Users\str> Get-ChildItem -LiteralPath $root -Recurse -File |
>> Where-Object { $_.Extension -in '.html','.css','.js','.xml' } |
>> Select-String -Pattern 'devicePixelRatio|innerWidth|clientWidth|screen\.width|visualViewport|viewport|100vh|100vw|scale\(|zoom:|width:.*height:' |
>> Select-Object Path, LineNumber, Line
Path LineNumber Line
---- ---------- ----
C:\Temp\pepper42-build\wgt-staging\index.html 6 <meta name="viewport" content="width=d...
C:\Temp\pepper42-build\wgt-staging\index.html 15 <div id="eventAnchor" tabindex="0" style...
C:\Temp\pepper42-build\wgt-staging\static\css\material.min.css 8 @charset "UTF-8";html{color:rgba(0,0,0,....
C:\Temp\pepper42-build\wgt-staging\static\css\style.css 207 -webkit-transform: scale(1.15);
C:\Temp\pepper42-build\wgt-staging\static\css\style.css 208 transform: scale(1.15);
C:\Temp\pepper42-build\wgt-staging\static\css\style.css 259 -webkit-transform: scale(1.15);
C:\Temp\pepper42-build\wgt-staging\static\css\style.css 260 transform: scale(1.15);
C:\Temp\pepper42-build\wgt-staging\static\css\style.css 316 height: 100vh !important;
C:\Temp\pepper42-build\wgt-staging\static\js\index.js 721 var screenWidth = window.innerWidth;
C:\Temp\pepper42-build\wgt-staging\static\js\jquery-2.2.0.min.js 3 }else c=void 0;return c}n.extend({hasDat...
C:\Temp\pepper42-build\wgt-staging\static\js\material.min.js 9 this.actionHandler_&&(this.actionElement...
PS C:\Users\str>