Last active
September 4, 2024 14:14
-
-
Save RobinDev/519b31f335355338530380c971edaa7f to your computer and use it in GitHub Desktop.
Revisions
-
RobinDev revised this gist
Sep 4, 2024 . 1 changed file with 14 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,14 @@ javascript: (function() { var text = ""; document.querySelectorAll(".node-voyage h3").forEach(function(e) { text += e.innerText + "\n"; }); text = text.trim(); var textarea = document.createElement("textarea"); textarea.value = text; document.body.appendChild(textarea); textarea.select(); document.execCommand("copy"); document.body.removeChild(textarea); alert("Le texte a été copié dans le presse-papiers."); })(); -
RobinDev revised this gist
Sep 4, 2024 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ javascript:(function(){var text="";document.querySelectorAll(".node-voyage h3").forEach(function(e){text+=e.innerText+"\n";});text=text.trim();var textarea=document.createElement("textarea");textarea.value=text;document.body.appendChild(textarea);textarea.select();document.execCommand("copy");document.body.removeChild(textarea);alert("Le texte a été copié dans le presse-papiers.");})(); -
RobinDev revised this gist
Sep 3, 2024 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,4 +14,11 @@ javascript: (function () { ); window.location.href = newUrl; } else if (hostname === "grandangle2023.votre-projet.com") { var newUrl = location.href.replace( "grandangle2023.votre-projet.com", "www.grandangle.fr" ); window.location.href = newUrl; } })(); -
RobinDev revised this gist
Sep 3, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ javascript: (function () { "grandangle-d7.votre-projet.com" ); window.location.href = newUrl; } else if (hostname === "grandangle-d7.votre-projet.com") { var newUrl = location.href.replace( "grandangle-d7.votre-projet.com", "www.grandangle.fr" -
RobinDev revised this gist
Sep 3, 2024 . 1 changed file with 17 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ javascript: (function () { var location = window.location; var hostname = location.hostname; if (hostname === "www.grandangle.fr") { var newUrl = location.href.replace( "www.grandangle.fr", "grandangle-d7.votre-projet.com" ); window.location.href = newUrl; } else if (hostname === "grandangle2023.votre-projet.com") { var newUrl = location.href.replace( "grandangle-d7.votre-projet.com", "www.grandangle.fr" ); window.location.href = newUrl; } })(); -
RobinDev revised this gist
Jun 11, 2024 . 1 changed file with 10 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,4 @@ javascript: (function () { function getIndentationLevel(row) { const indentationDiv = row.querySelectorAll(".js-indentation"); return indentationDiv.length; } @@ -24,13 +23,16 @@ javascript: (function () { const parentRow = getParentRow(row); if (parentRow) { const parentLink = parentRow .querySelector(".tabledrag-cell-content__item") .textContent.trim(); const currentLink = row.querySelector(".tabledrag-cell-content__item span") || row.querySelector(".tabledrag-cell-content__item a"); if (currentLink) currentLink.innerHTML = `${currentLink.innerHTML.trim()}` + (currentLink.querySelectorAll("br").length !== 0 ? "" : "<br>") + ` <small style="color:rgb(34, 35, 48)">\\ ${parentLink}</small>`; } }); } -
RobinDev renamed this gist
Jun 7, 2024 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
RobinDev revised this gist
Jun 7, 2024 . 1 changed file with 17 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ javascript: (function () { var location = window.location; var hostname = location.hostname; if (hostname === "www.grandangle.fr") { var newUrl = location.href.replace( "www.grandangle.fr", "grandangle2023.votre-projet.com" ); window.location.href = newUrl; } else if (hostname === "grandangle2023.votre-projet.com") { var newUrl = location.href.replace( "grandangle2023.votre-projet.com", "www.grandangle.fr" ); window.location.href = newUrl; } })(); -
RobinDev revised this gist
Jun 7, 2024 . 1 changed file with 46 additions and 35 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,36 +1,47 @@ javascript: (function () { function getIndentationLevel(row) { const indentationDiv = row.querySelectorAll(".js-indentation"); return indentationDiv.length; } function getParentRow(row) { const currentIndentLevel = getIndentationLevel(row); console.log(currentIndentLevel); let previousRow = row.previousElementSibling; while (previousRow) { const previousIndentLevel = getIndentationLevel(previousRow); if (previousIndentLevel < currentIndentLevel) { return previousRow; } previousRow = previousRow.previousElementSibling; } return null; } function injectParents() { const rows = document.querySelectorAll("table#menu-overview tbody tr"); rows.forEach((row) => { const parentRow = getParentRow(row); if (parentRow) { const parentLink = parentRow .querySelector(".menu-item__link") .textContent.trim(); const currentLink = row.querySelector(".menu-item__link"); currentLink.innerHTML = `${currentLink.innerHTML.trim()}` + (currentLink.querySelectorAll("br").length !== 0 ? "" : "<br>") + ` <small style="color:rgb(34, 35, 48)">\\ ${parentLink}</small>`; } }); } function removeDisabledItems() { var elements = document.querySelectorAll("tr.menu-disabled"); elements.forEach(function (element) { element.parentNode.removeChild(element); }); } removeDisabledItems(); injectParents(); })(); -
RobinDev renamed this gist
Jun 7, 2024 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
RobinDev revised this gist
Jun 7, 2024 . No changes.There are no files selected for viewing
-
RobinDev created this gist
Jun 7, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ javascript:(function() { function getIndentationLevel(row) { const indentationDiv = row.querySelectorAll(".js-indentation"); return indentationDiv.length; } function getParentRow(row) { const currentIndentLevel = getIndentationLevel(row); console.log(currentIndentLevel); let previousRow = row.previousElementSibling; while (previousRow) { const previousIndentLevel = getIndentationLevel(previousRow); if (previousIndentLevel < currentIndentLevel) { return previousRow; } previousRow = previousRow.previousElementSibling; } return null; } function injectParents() { const rows = document.querySelectorAll("table#menu-overview tbody tr"); rows.forEach((row) => { const parentRow = getParentRow(row); if (parentRow) { const parentLink = parentRow.querySelector(".menu-item__link").textContent.trim(); const currentLink = row.querySelector(".menu-item__link"); currentLink.innerHTML = `${currentLink.innerHTML.trim()}` + (currentLink.querySelectorAll("br").length !== 0 ? "" : "<br>") + ` <small style="color:rgb(34, 35, 48)">\\ ${parentLink}</small>`; } }); } injectParents(); })();