1
Fix to resize Console window
I don't know how it all works. I just figured out how to implement the code that Jacques posted here. Thank you very much Jacques. This code can be entered in "Trigger after open", but I unfortunately don't know how to make the dialog automatically close so hopefully Jacques will jump in with a fix. Here's the code...
dialog("Console CSS Modifier", "<script>
function modifier(sChemin, sPropriete, sVal){
var bFind = false,
aStyleSheets = document.styleSheets,
exp_reg = new RegExp(sChemin,'gi');
for(var i = 0; i < aStyleSheets.length; ++i){
try{
var aCssRules = aStyleSheets[i].cssRules;
for(var j = 0; j < aCssRules.length; ++j){
if(exp_reg.test(aCssRules[j].selectorText)){
aCssRules[j].style[sPropriete] = sVal;
bFind = true;
}//if
}//for
} catch(error) {
continue
}
}
return bFind;
}
modifier( '.Console_input', 'resize', 'vertical' );
</script>", ["close"])
Look for the indicator at the bottom right corner of the input window.
4 replies
-
dialog("Console CSS Modifier", "<script> function modifier(sChemin, sPropriete, sVal){ var bFind = false, aStyleSheets = document.styleSheets, exp_reg = new RegExp(sChemin,'gi'); for(var i = 0; i < aStyleSheets.length; ++i){ try{ var aCssRules = aStyleSheets[i].cssRules; for(var j = 0; j < aCssRules.length; ++j){ if(exp_reg.test(aCssRules[j].selectorText)){ aCssRules[j].style[sPropriete] = sVal; bFind = true; }//if }//for } catch(error) { continue } } return bFind; } modifier( '.Console_input', 'resize', 'vertical' ); var interval = setInterval(() => { var bt = document.querySelector('.nx-alert .nx-button-text'); if (bt) { bt.click(); clearInterval(interval); } }); </script>", ["close"])
-
This is a simpler version. No need to search through CSS files.
dialog("Console CSS Modifier", "<script> var styleSheet = document.styleSheets[2]; styleSheet.insertRule('.Console_input{resize:vertical}'); var interval = setInterval(() => { var bt = document.querySelector('.nx-alert .nx-button-text'); if (bt) { bt.click(); clearInterval(interval); } }); </script>", ["close"])
-
I had not seen this post. Thanks Sean, it's very handy to be able to redefine the size of the console
Content aside
-
1
Likes
- 1 yr agoLast active
- 4Replies
- 191Views
-
2
Following