Refactor duplicated callback function for collapse and expand options
Refactor duplicated callback function for collapse and expand options

OpenRoberta/blockly,carlosperate/ardublockly,carlosperate/ardublockly,InspectorWidget/blockly,michalkilawok/blockly,trodi/blockly,jstnhuang/blockly,trinketapp/blockly,google/blockly,mark-friedman/blockly,aseba-community/blockly,google/blockly,google/blockly-devtools,HALtheWise/blockly,RealTimeWeb/blockly,gengshenghong/scratch-blocks,rachel-fenichel/blockly,LLK/scratch-blocks,rachel-fenichel/blockly,gupta137/blockly,sclements/scratch-blocks,markocelan/blockly-minecraft,carloslfu/blockly,dhalupa/blockly,gudtago/blockly,nickmain/blockly,in1004kyu/tokitool,groklearning/blockly,Tinkerforge/tvpl-blockly,MaryS94/blockly,gudtago/blockly,mark-friedman/blockly,carloslfu/blockly,aninternetof/blockly,joshlory/blockly,cmillani/blockly,daarond/blockly,OpenRoberta/blockly,griffpatch/scratch-blocks,daarond/blockly,lzairdking/blockly,jstnhuang/blockly,aninternetof/blockly,jano42/blockly,Gamefroot/Gamefroot-Blockly,Gamefroot/Gamefroot-Blockly,TechplexEngineer/blockly,jano42/blockly,griffpatch/scratch-blocks,rachel-fenichel/blockly,in1004kyu/tokitool,groklearning/blockly,RealTimeWeb/blockly,drigz/blockly,joshlory/blockly,twodee/blockly,trinketapp/blockly,drigz/blockly,gengshenghong/scratch-blocks,nickmain/blockly,picklesrus/blockly,trinketapp/blockly,twodee/blockly,LLK/scratch-blocks,groklearning/blockly,toebes-extreme/blockly,edbutler/blockly,gengshenghong/scratch-blocks,trodi/blockly,HALtheWise/blockly,vinay5jan/blocklyExtended,mark-friedman/blockly,hkoi/blockly,trodi/blockly,ChinJY/blockly,LLK/scratch-blocks,rachel-fenichel/blockly,ocadotechnology/blockly,gudtago/blockly,jano42/blockly,carlosperate/ardublockly,gupta137/blockly,trinketapp/blockly,OpenRoberta/blockly,jstnhuang/blockly,sclements/scratch-blocks,lzairdking/blockly,CocoMake7/CocoBlockly,ocadotechnology/blockly,jisqyv/blockly,lzairdking/blockly,carlosperate/blockly,marianoguerra/blockly,google/blockly,ralic/blockly,dhalupa/blockly,mark-friedman/blockly,Tinkerforge/tvpl-blockly,rachel-fenichel/blockly,LLK/scratch-blocks,marianoguerra/blockly,InspectorWidget/blockly,toebes-extreme/blockly,edbutler/blockly,griffpatch/scratch-blocks,google/blockly-devtools,jisqyv/blockly,stefan-j/blockly,Immortalin/blockly,toebes-extreme/blockly,InspectorWidget/blockly,stefan-j/blockly,ocadotechnology/blockly,michalkilawok/blockly,ChinJY/blockly,ralic/blockly,sclements/scratch-blocks,Tinkerforge/tvpl-blockly,twodee/blockly,vinay5jan/blocklyExtended,twodee/blockly,drigz/blockly,gengshenghong/scratch-blocks,vinay5jan/blocklyExtended,aninternetof/blockly,trodi/blockly,CocoMake7/CocoBlockly,google/blockly,RealTimeWeb/blockly,sclements/scratch-blocks,nickmain/blockly,twodee/blockly,griffpatch/scratch-blocks,stefan-j/blockly,MaryS94/blockly,hkoi/blockly,LLK/scratch-blocks,dhalupa/blockly,in1004kyu/tokitool,joshlory/blockly,gupta137/blockly,picklesrus/blockly,markocelan/blockly-minecraft,nickmain/blockly,markocelan/blockly-minecraft,aravart/speech-blocks,carlosperate/blockly,mark-friedman/blockly,jstnhuang/blockly,google/blockly,carlosperate/blockly,Gamefroot/Gamefroot-Blockly,marianoguerra/blockly,groklearning/blockly,aravart/speech-blocks,ChinJY/blockly,carlosperate/blockly,google/blockly,nickmain/blockly,Gamefroot/Gamefroot-Blockly,aseba-community/blockly,griffpatch/scratch-blocks,markocelan/blockly-minecraft,mark-friedman/blockly,carloslfu/blockly,picklesrus/blockly,jano42/blockly,TechplexEngineer/blockly,gengshenghong/scratch-blocks,OpenRoberta/blockly,Immortalin/blockly,aseba-community/blockly,twodee/blockly,jisqyv/blockly,rachel-fenichel/blockly,ralic/blockly,HALtheWise/blockly,Immortalin/blockly,google/blockly,cmillani/blockly,rachel-fenichel/blockly,edbutler/blockly,michalkilawok/blockly,cmillani/blockly,lzairdking/blockly,MaryS94/blockly,CocoMake7/CocoBlockly,sclements/scratch-blocks,hkoi/blockly,daarond/blockly,nickmain/blockly,stefan-j/blockly