Author Topic: Chat box size toggle  (Read 1274 times)

March 17, 2013, 04:39 PM #0

torq Offline

  • Posts: 692
  • Join Date: Oct 2012
    Location: Winnipeg, MB
  • Real Name: Graham
  • Vehicle: '10 mazdaspeed3
  • Reputation Power: 9
  • torq has no influence.
So I got tired of the tiny chatbox and whipped up the following bastardized javascript.

Just make a new shortcut and put the following as the URL,  change bigBawx="500px"  to whatever size you want your chatbox to expand to. 500 is a decent default.

javascript:(function(){ var smallBawx="150px"; var bigBawx="500px"; var elem = document.getElementById("nchat_admin_shoutbox"); if (elem.style.height===smallBawx) {elem.style.height=bigBawx;} else {elem.style.height=smallBawx;} })();

Works in chrome, death to other browsers.
Last Edit: March 17, 2013, 04:41 PM by torq

    Top Tier Imports

    Chat box size toggle
    « on: March 17, 2013, 04:39 PM »

    March 17, 2013, 07:09 PM #1

    CFMP RAblue Offline

    • Regular Member
    • Posts: 4,031
    • Join Date: Mar 2012
      Location: Winnipeg, MB
    • Real Name: Grant
    • Vehicle: 09 Mits Ralliart Octane blue
    • Reputation Power: 58
    • CFMP RAblue is on the verge of being accepted.CFMP RAblue is on the verge of being accepted.CFMP RAblue is on the verge of being accepted.CFMP RAblue is on the verge of being accepted.CFMP RAblue is on the verge of being accepted.
    I would like a toggle button to make it bigger for when lots of ppl are in it but isnt there a better way???  MMMMMOOOOODDDDDSSSSSSS do somethiiiiiiiiiinnnnnnnnnnnnnnnnnngggggggggggggggg!!!!!!!!!!!

    also have no idea what/how the gibberish torq put up works or w/e lol
    "Go Fast, Stop Fast"
    Extreme Stop Slotted/Drilled Rotors
    KVR Performance Slotted Rotors
    Magnaflow CBE

      March 17, 2013, 07:25 PM #2

      torq Offline

      • Posts: 692
      • Join Date: Oct 2012
        Location: Winnipeg, MB
      • Real Name: Graham
      • Vehicle: '10 mazdaspeed3
      • Reputation Power: 9
      • torq has no influence.
      It is a toggle. Sorry I program/architect computer systems for a living so it's second nature to fix stuff, I'll make it prettier!  It just toggles between 2 chatbox window sizes. You just make it a button on your browser using the shortcut. Server side would be easier depending on the backend, hard to tell, I just got tired of the tiny chatbox, so just sharing if people want to use it.

      javascript:(function(){
          var smallBawx="150px";
          var bigBawx="500px";
          var elem = document.getElementById("nchat_admin_shoutbox");
          if (elem.style.height===smallBawx)
                   {elem.style.height=bigBawx;}
          else
                   {elem.style.height=smallBawx;}
       })();

        March 18, 2013, 01:03 PM #3

        jordisonjr Offline

        • Regular Member
        • Posts: 6,436
        • Join Date: Mar 2012
          Location: Winnipeg
        • Real Name: Jordan.
        • Vehicle: 14/15 Endeavor New Standard 151
        • Reputation Power: 202
        • jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!
        I still have no idea what you're saying :lol:
        Originally posted by Madbuzz41
        I'm not a fan of blowing for a long time anyways ; )


        [Mar 31 23:03:18] Basil:Dan go outside without your pants and let your beef curtains flap around in the wind like a windsock

        [Dec 11 14:00:38] alexatwork21:I

          March 18, 2013, 01:24 PM #4

          Murderjetz Offline

          • Regular Member
          • Posts: 881
          • Join Date: Apr 2012
            Location: Manitoba
          • Real Name: Eric St-Onge
          • Vehicle: I ain't got none
          • Reputation Power: 10
          • Murderjetz has no influence.
          I see how the code could do something like change the size of a chat box but your directions still don't make sense. What do you mean by making it a button using the shortcut? What shortcut? Like a bookmark? Bookmarking a piece of code doesn't make sense.

            March 18, 2013, 01:35 PM #5

            torq Offline

            • Posts: 692
            • Join Date: Oct 2012
              Location: Winnipeg, MB
            • Real Name: Graham
            • Vehicle: '10 mazdaspeed3
            • Reputation Power: 9
            • torq has no influence.

            March 18, 2013, 01:43 PM #6

            ACiFiC Offline

            • Regular Member
            • Posts: 3,700
            • Join Date: Apr 2012
              Location: MBR Clubhouse
            • Real Name: Andre
            • Vehicle: x2 Eunos
            • Reputation Power: 85
            • ACiFiC is a force to reckon with.ACiFiC is a force to reckon with.ACiFiC is a force to reckon with.ACiFiC is a force to reckon with.ACiFiC is a force to reckon with.ACiFiC is a force to reckon with.ACiFiC is a force to reckon with.ACiFiC is a force to reckon with.
            That's awesome.
            Originally posted by Winter Beater
            If a car is shows that a solid effort was made, and the car is reasonably well executed I can respect that. Even if it's not my cup of tea..

              March 18, 2013, 03:12 PM #7

              jordisonjr Offline

              • Regular Member
              • Posts: 6,436
              • Join Date: Mar 2012
                Location: Winnipeg
              • Real Name: Jordan.
              • Vehicle: 14/15 Endeavor New Standard 151
              • Reputation Power: 202
              • jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!jordisonjr is awe-inspiring!
              wow much better
              Originally posted by Madbuzz41
              I'm not a fan of blowing for a long time anyways ; )


              [Mar 31 23:03:18] Basil:Dan go outside without your pants and let your beef curtains flap around in the wind like a windsock

              [Dec 11 14:00:38] alexatwork21:I

                March 18, 2013, 04:21 PM #8

                torq Offline

                • Posts: 692
                • Join Date: Oct 2012
                  Location: Winnipeg, MB
                • Real Name: Graham
                • Vehicle: '10 mazdaspeed3
                • Reputation Power: 9
                • torq has no influence.
                I make things work, I have minions to do my documentation usually.

                  March 18, 2013, 05:14 PM #9

                  Murderjetz Offline

                  • Regular Member
                  • Posts: 881
                  • Join Date: Apr 2012
                    Location: Manitoba
                  • Real Name: Eric St-Onge
                  • Vehicle: I ain't got none
                  • Reputation Power: 10
                  • Murderjetz has no influence.
                  Originally posted by torq
                  gah

                  That's weird, that is what I tried and clicking it wasn't doing anything :/

                    March 18, 2013, 06:49 PM #10

                    Riley Offline

                    • Posts: 4,772
                    • Join Date: May 2014
                    • Real Name: Riley
                    • Vehicle: '15 Fiesta ST
                    • Reputation Power: 128
                    • Riley is awe-inspiring!Riley is awe-inspiring!Riley is awe-inspiring!Riley is awe-inspiring!Riley is awe-inspiring!Riley is awe-inspiring!Riley is awe-inspiring!Riley is awe-inspiring!Riley is awe-inspiring!Riley is awe-inspiring!Riley is awe-inspiring!Riley is awe-inspiring!
                    thank you good sir. shaun, why couldn't you do this for us????
                    #keepingitstock

                      March 18, 2013, 07:23 PM #11

                      TonyPajamaz Offline

                      • Posts: 4,732
                      • Join Date: Mar 2012
                        Location: Winnipeg, MB
                      • Vehicle: 2012 Audi A4, 1996 Mazda MX-5 Miata
                      • Reputation Power: 78
                      • TonyPajamaz has a powerful will.TonyPajamaz has a powerful will.TonyPajamaz has a powerful will.TonyPajamaz has a powerful will.TonyPajamaz has a powerful will.TonyPajamaz has a powerful will.TonyPajamaz has a powerful will.
                      Wait...where do you hook up the VCR?
                      [Jan 01 21:16:06] Faken:most steady hand/10

                      [Sep 23 14:27:56] Faken:i was focusing on dan's bum

                        March 18, 2013, 08:49 PM #12

                        CFMP RAblue Offline

                        • Regular Member
                        • Posts: 4,031
                        • Join Date: Mar 2012
                          Location: Winnipeg, MB
                        • Real Name: Grant
                        • Vehicle: 09 Mits Ralliart Octane blue
                        • Reputation Power: 58
                        • CFMP RAblue is on the verge of being accepted.CFMP RAblue is on the verge of being accepted.CFMP RAblue is on the verge of being accepted.CFMP RAblue is on the verge of being accepted.CFMP RAblue is on the verge of being accepted.
                        Finally

                        "Go Fast, Stop Fast"
                        Extreme Stop Slotted/Drilled Rotors
                        KVR Performance Slotted Rotors
                        Magnaflow CBE

                          Top Tier Imports

                          Chat box size toggle
                          « Reply #12 on: March 18, 2013, 08:49 PM »