Skip to content

Commit

Permalink
use pade.chat for chordpro when browser extension or hosted in github.io
Browse files Browse the repository at this point in the history
  • Loading branch information
deleolajide committed Jan 19, 2025
1 parent d078b46 commit 269219a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ <h4><span style="margin-right: 20px" id="bass-mute"></span>Bass</h4>
<div style="display: none;" class="pedalboard">
</fluent-tabs>
</div>
<iframe src="https://pade.chat:5443/orinayo/chordpro-pdf-online/" style="display: none;" id="chordpro"></iframe>
<iframe style="display: none;" id="chordpro"></iframe>
<div style="display: none;" id="chatview" class="converse-container">
<converse-root></converse-root>
</div>
Expand Down
8 changes: 7 additions & 1 deletion docs/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1969,11 +1969,17 @@ async function onloadHandler() {
lyricsCanvas = document.querySelector("#lyrics");
lyricsContext = lyricsCanvas.getContext('2d');

const settings = document.querySelector("#settings");
const chordpro = document.querySelector("#chordpro");
chordpro.src = "https://pade.chat:5443/orinayo/chordpro-pdf-online/";

if (!location.origin.startsWith("chrome-extension") && !location.origin.startsWith("https://jus-be.github.io/")) {
chordpro.src = location.host + "/orinayo/chordpro-pdf-online/";
}

const chatview = document.querySelector("#chatview");
const gameCanvas = document.querySelector("#gameCanvas");
const toggleChat = document.querySelector("#toggle_chat");
const settings = document.querySelector("#settings");

toggleChat.addEventListener('click', function(event) {
chatview.style.display = "none";
Expand Down

0 comments on commit 269219a

Please sign in to comment.