Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recreating request tab after comming back to home screen #44

Merged
merged 2 commits into from
Sep 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions 10.9.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,17 +427,19 @@ If you only want one link, make sure to remove the comma after the closing brack
![image](https://github.com/user-attachments/assets/b0860546-edc0-4d42-acba-3caa095ee666)


- Navigate to `/usr/share/jellyfin/web` and edit the `home-html.*.chunk.js` file
- Find the part that goes `{5939:function(a,e,t){` and paste right after it:
- Before everything, remeber to backup the files we are going to edit!
- Navigate to `/usr/share/jellyfin/web` and edit the `index.html` file
- Find the part that goes `</body></html>` and paste right before it:
````
const title=document.createElement("div");title.classList.add("emby-button-foreground");title.innerText="Requisições";const button=document.createElement("button");button.type="button";button.is="empty-button";button.classList.add("emby-tab-button","emby-button","lastFocused");button.setAttribute("data-index","2");button.appendChild(title);(function e(){const tabb=document.querySelector(".emby-tabs-slider");tabb?tabb.appendChild(button):setTimeout(e,500)})();
````
- This is what gonna create the "Requests" tab
- Now, find the part that goes `data-backdroptype="movie,series,book">` and paste right after it:
<script>const createRequestTab = () => {const title = document.createElement("div");title.classList.add("emby-button-foreground");title.innerText = "Requisições";const button = document.createElement("button");button.type = "button";button.is = "empty-button";button.classList.add("emby-tab-button", "emby-button", "lastFocused");button.setAttribute("data-index", "2");button.setAttribute("id", "requestTab");button.appendChild(title);(function e() {const tabb = document.querySelector(".emby-tabs-slider");tabb ? !document.querySelector("#requestTab") && tabb.appendChild(button) : setTimeout(e, 500)})();}</script>
````
<style>root{--save-gut:max(env(safe-area-inset-left),3.3%)}.requestIframe{margin:0 .4em;padding:0 var(--save-gut);width:calc(100% - (.4em * 2) - (var(--save-gut) * 2));height:85vh;border:none;position:absolute;top:0}</style>
- Save it. This is the script that creates the tab.
- Now open the `home-html.*.chunk.js` file
- Find the part that goes `data-backdroptype="movie,series,book">` and paste right after it:
````
- This is what will make it looks good
<style>:root{--save-gut:max(env(safe-area-inset-left),3.3%)}.requestIframe{margin:0 .4em;padding:0 var(--save-gut);width:calc(100% - (.4em * 2) - (var(--save-gut) * 2));height:85vh;border:none;position:absolute;top:0}</style><script>setTimeout(() => {createRequestTab()}, 500)</script>
````
- This is what will make it looks good and start the script that creates the tab
- And now, find the part that goes `id="favoritesTab" data-index="1"> <div class="sections"></div> </div>` and paste right after it:
````
<div class="tabContent pageTabContent" id="requestsTab" data-index="2"> <div class="sections"><iframe class="requestIframe" src="[YOUR_REQUEST_SERVICE_HERE]"></iframe></div> </div>
Expand Down