-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Launch parameters, host commands, fixed zoom, custom configs
- Loading branch information
Showing
16 changed files
with
744 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cmd /d /c start "" /B "..\ProtonShell.exe" -a "https://www.icloud.com/notes/" -n "Notes" -w 720 -h 480 -b 2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cmd /d /c start "" /B "..\ProtonShell.exe" -a "https://chatgpt.com" -n "ChatGPT"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cmd /d /c start "" /B "..\ProtonShell.exe" -a "https://google.com" -n "Google" -d" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cmd /d /c start "" /B "..\ProtonShell.exe" -a "https://discord.com" -n "Discord" -iw" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cmd /d /c start "" /B "..\ProtonShell.exe" -a "https://instagram.com" -n "Instagram" -w 360 -h 640 -u "Instagram 343.0.0.33.101 Android (34/14; 383dpi; 1080x2145; samsung; SM-A156M; a15x; mt6835; pt_BR; 629710169)"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cmd /d /c start "" /B "..\ProtonShell.exe" -f "Apps\tv.html" -n "TV UI" -fullscreen" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cmd /d /c start "" /B "..\ProtonShell.exe" -a "https://www.twitch.tv/popout/residentevil/chat" -n "Twitch chat" -w 360 -h 640 -iw" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cmd /d /c start "" /B "..\ProtonShell.exe" -a "https://x.com" -n "X" -w 480 -h 640" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cmd /d /c start "" /B "..\ProtonShell.exe" -a "https://youtube.com/tv" -u "Roku/DVP-14.0 (14.0.4.12221-CG)" -n "YouTube on TV" -fullscreen -s "YouTube.js"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// Функция для поиска кнопки и добавления слушателя событий | ||
function trackButton() { | ||
// Получаем все кнопки с указанным классом | ||
const buttons = document.querySelectorAll('.ytlr-button--large-shape'); | ||
|
||
if (buttons.length > 1) { // Проверяем, есть ли хотя бы две кнопки | ||
const button = buttons[1]; // Выбираем вторую кнопку (индекс 1) | ||
|
||
//console.log('Вторая кнопка найдена, создаем дубликат.'); | ||
|
||
// Создаем дубликат кнопки | ||
const newButton = button.cloneNode(true); // Клонируем кнопку, включая ее содержимое и атрибуты | ||
|
||
// Удаляем оригинальную кнопку | ||
const parent = button.parentNode; // Получаем родительский элемент | ||
if (parent) { | ||
parent.removeChild(button); // Удаляем оригинальную кнопку | ||
|
||
// Убираем aria-hidden у новой кнопки, чтобы она была доступна | ||
newButton.removeAttribute('aria-hidden'); // Удаляем атрибут aria-hidden | ||
newButton.setAttribute('tabindex', '0'); // Добавляем tabindex, чтобы кнопка могла получать фокус | ||
|
||
// Добавляем новый элемент на место оригинала | ||
newButton.addEventListener('click', function(event) { | ||
window.chrome.webview.postMessage('close'); | ||
//alert('Кнопка нажата!'); // Показываем алерт | ||
//console.log('Кнопка нажата:', event); | ||
//console.dir(event.target); | ||
}); | ||
|
||
// Вставляем дубликат в то же место | ||
parent.insertBefore(newButton, button.nextSibling); // Вставляем новый элемент после оригинала | ||
//console.log('Дубликат второй кнопки добавлен с обработчиком клика.'); | ||
|
||
// Устанавливаем флаг, чтобы избежать повторной обработки | ||
// buttonProcessed = true; // Убираем этот флаг, чтобы кнопка могла заменяться повторно | ||
|
||
// Проверяем доступность новой кнопки | ||
//console.log('Новая кнопка:', newButton); | ||
} else { | ||
//console.error('Родительский элемент не найден.'); // Если родителя нет, выводим сообщение об ошибке | ||
} | ||
} else { | ||
//console.log('Недостаточно кнопок. Попробуем снова через 1 секунду.'); | ||
} | ||
} | ||
|
||
// Дожидаемся полной загрузки документа | ||
//console.log('Документ загружен, ищем кнопки...'); | ||
|
||
// Пробуем сразу найти кнопки | ||
trackButton(); | ||
|
||
// Если кнопки не найдены сразу, ищем их периодически | ||
const interval = setInterval(() => { | ||
trackButton(); // Теперь просто вызываем функцию | ||
}, 1000); // Проверяем каждые 1000 миллисекунд (1 секунда) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>TV UI</title> | ||
<style> | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
user-select: none; | ||
} | ||
body { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
font-family: Arial, sans-serif; | ||
background: rgb(0,59,119); | ||
background: radial-gradient(circle, rgba(0,59,119,1) 0%, rgba(42,75,129,1) 100%); | ||
} | ||
.container { | ||
display: grid; | ||
grid-template-columns: repeat(5, 200px); | ||
grid-template-rows: repeat(2, 120px); | ||
grid-gap: 40px; /* Увеличенное расстояние между блоками */ | ||
justify-content: center; | ||
} | ||
.block { | ||
width: 200px; | ||
height: 120px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
border-radius: 15px; | ||
color: white; | ||
font-size: 1.2rem; | ||
transition: transform 0.2s ease, box-shadow 0.2s ease; | ||
box-shadow: 0 0 25px rgba(0,0,0, 0.2); | ||
cursor: pointer; | ||
} | ||
.block.selected { | ||
transform: scale(1.2); | ||
box-shadow: 0 0 25px rgba(4,105,226, 0.8); | ||
} | ||
.block:hover { | ||
transform: scale(1.2); | ||
box-shadow: 0 0 25px rgba(4,105,226, 0.8); | ||
} | ||
</style> | ||
<script type="text/javascript"> | ||
let container; | ||
let mainPath = '\\Apps\\'; | ||
|
||
const gradients = [ | ||
'linear-gradient(180deg, #e74c3c, #c33425)', // 1 Красный | ||
'linear-gradient(180deg, #1ac6fb, #1d72f2)', // 2 Синий | ||
'linear-gradient(180deg, #ffa601, #f9691d)', // 3 Оранджевый | ||
'linear-gradient(180deg, #2ecc71, #159f50)', // 4 Зелёный | ||
'linear-gradient(180deg, #d46cfb, #862ec3)', // 5 Темно-розовый | ||
'linear-gradient(180deg, #7882ff, #434dcf)', // 6 Фиолетовый | ||
'linear-gradient(180deg, #95a5a6, #626e6f)' // 7 Серый | ||
]; | ||
|
||
let colorCounter = 0; // Счетчик для градиентов | ||
let selectedIndex = 0; | ||
const appsCountInLine = 5; | ||
|
||
function openApp(block) { | ||
window.chrome.webview.postMessage('open ' + block.getAttribute('appPath').replaceAll('\\', '\\\\')); | ||
} | ||
|
||
function addApp(fileName) { | ||
const block = document.createElement('div'); | ||
block.classList.add('block'); | ||
block.textContent = fileName.split('.').slice(0, -1).join('.'); | ||
block.setAttribute('appPath', mainPath + fileName); | ||
block.setAttribute('onclick', 'openApp(this)'); | ||
|
||
// Применение градиента по счетчику | ||
block.style.background = gradients[colorCounter % gradients.length]; | ||
|
||
// Обработчик наведения мыши | ||
block.addEventListener('mouseover', () => { | ||
selectedIndex = Array.from(container.children).indexOf(block); // Обновляем selectedIndex | ||
updateSelection(); // Обновляем состояние выделения | ||
}); | ||
|
||
container.appendChild(block); | ||
colorCounter++; // Увеличиваем счетчик | ||
} | ||
|
||
function updateSelection() { | ||
const blocks = document.querySelectorAll('.block'); | ||
blocks.forEach((block, index) => { | ||
if (index === selectedIndex) { | ||
block.classList.add('selected'); | ||
} else { | ||
block.classList.remove('selected'); | ||
} | ||
}); | ||
} | ||
|
||
function handleKeyDown(event) { | ||
const blocks = document.querySelectorAll('.block'); | ||
if (event.key === 'ArrowRight') { | ||
selectedIndex = (selectedIndex + 1) % blocks.length; | ||
} else if (event.key === 'ArrowLeft') { | ||
selectedIndex = (selectedIndex - 1 + blocks.length) % blocks.length; | ||
} else if (event.key === 'ArrowDown') { | ||
if (selectedIndex + appsCountInLine < blocks.length) { | ||
selectedIndex += appsCountInLine; | ||
} | ||
} else if (event.key === 'ArrowUp') { | ||
if (selectedIndex - appsCountInLine >= 0) { | ||
selectedIndex -= appsCountInLine; | ||
} | ||
} else if (event.key === 'Enter') { | ||
window.chrome.webview.postMessage('open ' + blocks[selectedIndex].getAttribute('appPath').replaceAll('\\', '\\\\')); | ||
} | ||
updateSelection(); | ||
} | ||
|
||
function handleMessageFromHost(msg) { | ||
const list = msg.split(/\n/); | ||
list.forEach(item => { | ||
if (!item.endsWith('.js') && !item.endsWith('.html')) { | ||
addApp(item); | ||
} | ||
}); | ||
updateSelection(); // Начальное выделение | ||
} | ||
|
||
document.addEventListener('DOMContentLoaded', function(){ | ||
container = document.getElementById('container'); | ||
document.addEventListener('keydown', handleKeyDown); | ||
window.chrome.webview.postMessage('folder ' + mainPath); | ||
}); | ||
</script> | ||
</head> | ||
<body> | ||
<div class="container" id="container"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.