Skip to content

Commit

Permalink
Modal > remove test Toggle video button (Saltykheera, Hugolpz)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugolpz committed May 22, 2024
1 parent 1fe91cb commit f75a418
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 40 deletions.
39 changes: 0 additions & 39 deletions SignItCoreContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ var SignItCoreContent = function (locale) {
<div class="signit-panel-definition signit-definition">
<h2>Definition:
${ banana.i18n("si-overlay-coreContent-right-title",locale) }</h2>
<button id="video_toggle" >video?</button>
<div class="signit-definition-text"></div>
<div class="signit-definition-source">
<a href="https://fr
Expand Down Expand Up @@ -84,44 +83,6 @@ var SignItCoreContent = function (locale) {
// // TODO: Do something
// }.bind( this ) );


/*
// @saltykheera's toggle video solution :
document.addEventListener("DOMContentLoaded", function(){
// Initializing the visibility state
let video_pop = false;
// Toggle video-section visibility
function toggleVideoPop() {
console.log("Toggle video : " + video_pop)
video_pop = !video_pop;
$(".signit-panel-videos").toggle(video_pop);
$(".signit-panel-separator").toggle(video_pop);
}
// Button toggle video
$("#video_toggle").on("click", function () {
toggleVideoPop();
});
});
// @hugolpz toggle video solution :
// Create toggle button to add to definition panel:
showvideoWidget = new OO.ui.ToggleSwitchWidget( { value: true } ); // if choosepanels == both
showvideoWidget.setValue( _backgroundPage.params.choosepanels == 'both'? true:false; );
// Create legend:
showvideoLayout = new OO.ui.FieldLayout( showvideoWidget, {
label: banana.i18n("si-popup-settings-showvideo"),
align: 'top',
});
// Append in right place :
this.$definitionPanelContent.append( showvideoLayout.$element )
// On change : 1) change choosepanels value in local storage ; 2) refresh modal if possible or just directly toglle.
// showvideoWidget.on( 'change', _backgroundPage.storeParam.bind( _backgroundPage, 'choosepanels' ) );
// choosepanels= value==true?'both':'definition';
*/

SignItCoreContent.prototype.refresh = function (title, files) {
files = files || [];
this.$title.text(title);
Expand Down
4 changes: 3 additions & 1 deletion content_scripts/signit.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@
width: 100%;
}

/* TEST Toggle video button */
/* MODAL > TEST Toggle video button : REMOVED */
/*
#video_toggle {
cursor: pointer;
display: inline-block;
Expand All @@ -100,6 +101,7 @@
#video_toggle.active::before {
transform: translateX(20px);
}
*/

/* *************************************************************** */
/* Definition panel (right/bottom) ******************************* */
Expand Down

0 comments on commit f75a418

Please sign in to comment.