Skip to content

Commit

Permalink
Merge pull request #44 from ToMattBan/patch-1
Browse files Browse the repository at this point in the history
Recreating request tab after comming back to home screen
  • Loading branch information
BobHasNoSoul authored Sep 22, 2024
2 parents 7cec1c1 + 9080d7a commit 03b94d0
Showing 1 changed file with 10 additions and 8 deletions.
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

1 comment on commit 03b94d0

@brockar
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't work on Debian.

Please sign in to comment.