However, I have got no idea on how to edit the length of the menu. Here is the script
// Define navigation bar settings.
navBarX = 0;
//navBarMenuWidth = 190;
//navBarBorderWidth = 1;
//navBarPaddingWidth = 2;
I shall change the codes in red into wild value, which mean it will take up the size of the heading in the menu instead of a fix value is given.