From 9acfb7c196f5411c1e6e024df93fc830257ea638 Mon Sep 17 00:00:00 2001 From: Luca Leonardo Bologna Date: Wed, 14 Aug 2024 10:58:41 +0200 Subject: [PATCH] minor changes to layout and links --- index_dev.html | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/index_dev.html b/index_dev.html index f048ca3..1816864 100644 --- a/index_dev.html +++ b/index_dev.html @@ -65,13 +65,13 @@

- - -
@@ -200,15 +200,26 @@

let linkToAppPost = "&feature=mweb_c3_open_app&itc_campaign=mweb_c3_open_app&redirect_app_store_ios=1&app=desktop#Intent;package=com.google.android.youtube;scheme=vnd.youtube;launchFlags=268435456;end" let linkToApp = linkToAppPre + videoID + linkToAppPost; let replies = element["snippet"]["totalReplyCount"]; + let linkForApp = "window.open('" + linkToApp + "')"; + let linkForPage = 'https://www.youtube.com/watch?v=' + videoID; let videoDetailsDiv = document.createElement("div"); videoDetailsDiv.classList.add("col-12") let answersDiv = document.createElement("div"); - answersDiv.classList.add("col-3") + answersDiv.classList.add("col-4") answersDiv.setAttribute("style", "margin-top: var(--bs-gutter-y)"); - let appDiv = document.createElement("div"); + let appDiv = document.createElement("button"); + appDiv.classList.add("btn","btn-sm","btn-link") appDiv.classList.add("col-3") - let urlDiv = document.createElement("div"); + appDiv.classList.add("btn","btn-sm","btn-link") + appDiv.setAttribute("onclick", "window.open('" + linkToApp + "','_blank')"); + appDiv.innerHTML = "yt-url"; + appDiv.classList.add("col-3") + + let urlDiv = document.createElement("button"); + urlDiv.classList.add("btn","btn-sm","btn-link") + urlDiv.setAttribute("onclick", "window.open('" + linkForPage + "','_blank')"); + urlDiv.innerHTML = "yt-url"; urlDiv.classList.add("col-3") //let arrowDiv = document.createElement("div"); @@ -216,9 +227,10 @@

videoDetailsDiv.innerHTML = "" + videoTitle + "" + " - " + timeVideoPublished; answersDiv.innerHTML = "
Risposte: " + replies + "
"; - - appDiv.innerHTML = "" - urlDiv.innerHTML = ""; + + //appDiv.innerHTML = "" + //appDiv.innerHTML = "" + //urlDiv.innerHTML = ""; //arrowDiv.innerHTML = "" footerRow.appendChild(videoDetailsDiv) @@ -229,11 +241,11 @@

// in sns panel if (divId == "1a") { let buttonDiv = document.createElement("button"); - buttonDiv.classList.add("col-3", "btn", "btn-sm", "btn-link"); + buttonDiv.classList.add("col-2", "btn", "btn-sm", "btn-link"); buttonDiv.setAttribute("id", "txt_" + videoID); buttonDiv.addEventListener("click", showText); - buttonDiv.innerHTML = 'txt'; + buttonDiv.innerHTML = ''; footerRow.appendChild(buttonDiv); }