diff --git a/src/pregmod/FCTV/FCTV.css b/src/pregmod/FCTV/FCTV.css index 3b3bf999ee73a4dfa0f033569dc6ce2fce741f01..b5e57a50cc6da848b322573b09498bd9844ba2d8 100644 --- a/src/pregmod/FCTV/FCTV.css +++ b/src/pregmod/FCTV/FCTV.css @@ -1,3 +1,7 @@ +.FCTV { + display: flex; +} + .FCTVremote { text-align: center; justify-items: center; diff --git a/src/pregmod/FCTV/FCTV.js b/src/pregmod/FCTV/FCTV.js index 57c4bcfe1067bbdc039b1c50cecb7560bb1b6276..e89935c3a8b8fd862cb3a884830cfaf891688fc9 100644 --- a/src/pregmod/FCTV/FCTV.js +++ b/src/pregmod/FCTV/FCTV.js @@ -264,7 +264,6 @@ globalThis.FCTV = (function() { } } else if (usedRemote && (V.cheatMode > 0 || V.debugMode > 0 || V.FCTV.remote)) { p.append(`bring you the remote so you can choose whatever show you find interesting.`); - p.append(createRemote()); if (V.FCTV.channel.selected === V.FCTV.channel.last) { App.UI.DOM.appendNewElement("div", p, `You tuned into this channel last week, you may want choose something else.`); } @@ -279,16 +278,26 @@ globalThis.FCTV = (function() { if (V.FCTV.channel.selected >= -1) { p.append(`${FCTV.watch()}`); } + + p = displayRemote(p); return jQuery("#FCTVwatch").empty().append(p); + function displayRemote(node) { + const p = document.createElement("p"); + p.classList.add("FCTV"); + if (usedRemote && (V.cheatMode > 0 || V.debugMode > 0 || V.FCTV.remote)) { + p.append(createRemote()); + } + p.append(node); + return p; + } + function createRemote() { p = document.createElement("p"); p.classList.add("FCTVremote"); let div; const buttons = []; - // CHange to push each button to an array, then make the array into a grid - for (let i = 0; i < _possibleChannels.length; i++) { if (FCTV.showChannel(i, {usedRemote: usedRemote, seeAll: seeAll}).canSelect > 0) { if (V.FCTV.channel.selected !== i) { @@ -336,7 +345,9 @@ globalThis.FCTV = (function() { // <br> if (V.cheatMode > 0 || V.debugMode > 0) { - p.append( + App.UI.DOM.appendNewElement( + "div", + p, App.UI.DOM.link( `Toggle inappropriate`, () => { @@ -350,7 +361,9 @@ globalThis.FCTV = (function() { ) ); } - p.append( + App.UI.DOM.appendNewElement( + "div", + p, App.UI.DOM.link( `Randomise channel selection`, () => {