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

null
    • Sean
    • 1 yr ago
    • Reported - view
    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"])
    

    🤗😘

    • Sean
    • 1 yr ago
    • Reported - view

    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"])
    
    • Ninox developper
    • Jacques_TUR
    • 1 yr ago
    • Reported - view

    I had not seen this post.  Thanks Sean, it's very handy to be able to redefine the size of the console 👍

      • Sean
      • 1 yr ago
      • Reported - view

      Jacques TUR Thanks Jacques. I don’t think it’s necessary anymore though. It looks like Ninox has implemented this now.

Content aside

  • 1 Likes
  • 1 yr agoLast active
  • 4Replies
  • 175Views
  • 2 Following