Question: I need JS code that does the following

1.) Get's the current url of the page.

2.) If url = a certain url 
 Then = #header is set to display:none;

3.) If else = no change

Came up with a few ideas with no avail, struggling with this; appreciative of any and all help.

Answer: 
In a hexagon as follows, you need to know about the triangles that make up the edges:

```
    B                   B
    *--*                *
   /|   \              /|
  / |    \            / |
A*--*C    *  ==>   c /  | a
  \      /          /   |
   \    /          /    |
    *--*         A*-----*C
                     b

```

These triangles are known as 30-60-90 triangles because that's the angles making up the inner corners: `C = 90`, `A = 60`, `B = 30`.

The ratios of the sides for those triangles is `c = 2`, `b = 1` and `a = sqrt(3)`.

So, assuming you know `c` (it's the length of one of the hexagon sides), you can calculate the other two sides of that triangle without having to resort to trigonometry functions:

```
a = c * sqrt(3) / 2
b = c / 2

```

Once we know those values, the hexagon offsets are relatively easy to calculate just by eyeballing your grid and using the leftmost corner (`A` in my diagram above) of each hexagon as the start and end points.

The horizontal distance from `(0,0)` to `(0,1)` is `b + c + b - b` (heading northeast, east, southeast and southwest). That's the horizontal difference between all "adjacent" cells in a row and it simplifies to `b + c`, or `3 * c / 2` if you just want to use `c`.

The vertical distance from `(0,0)` to `(0,1)` (half a row) is simply `a` (southeast then the irrelevant east). That's equivalent to `sqrt(3) * c / 2` or probably close enough to `c * 433 / 500` (an error of one part in 16,000) as to not have to involve even square roots.

Although, if you'd prefer more accuracy, you could stick with the square root calculations - just remember to work out `sqrt(3) / 2` once at the start and just use that as the multiplier.

The vertical distance between rows is obviously double that, say for `(0,0)` to `(1,0)`.

So, for every full row, you simply move down `c * 433 / 250` units. For every column, you move across `c * 3 / 2` units and vertically `c * 433 / 500` units (down if you're moving from an even index to an odd one, otherwise up).
You can solve this with simple calculations, if you know (you should) the size of the hex cells.

```

   | small |
   | width |
    _______  ______
   /       \       h
  /         \      e
 /           \     i
 \           /     g
  \         /      h
|  \_______/ _|____t
|             |
|--- width ---|

```

```
uses
  System.Types,
  Vcl.Graphics;

type
  THexCellSize = record
    Width : Integer;
    Height : Integer;
    SmallWidth : Integer;
  end;

function GetHexDrawPoint( AHexCellSize : THexCellSize; ACol, ARow : Integer ) : TPoint;
begin
  Result.X := ( ( AHexCellSize.Width - AHexCellSize.SmallWidth ) div 2 + AHexCellSize.SmallWidth ) * ACol;
  Result.Y := AHexCellSize.Height * ARow + ( AHexCellSize.Height div 2 ) * ( ACol mod 2 );
end;

procedure DrawHexCell( ACanvas : TCanvas; AOffSet : TPoint; AHexCellSize : THexCellSize; ACol, ARow : Integer );
var
  LPoint : TPoint;
  LXOffset : Integer;
begin
  { *************
    *   1---2
    *  /     \
    * 6       3
    *  \     /
    *   5---4
    ************* }

  LXOffset := ( AHexCellSize.Width - AHexCellSize.SmallWidth ) div 2;

  // Move to point 1
  LPoint := GetHexDrawPoint( AHexCellSize, ACol, ARow );
  LPoint.Offset( AOffSet );
  ACanvas.MoveTo( LPoint.X, LPoint.Y );
  // Line to point 2
  LPoint.Offset( AHexCellSize.SmallWidth, 0 );
  ACanvas.LineTo( LPoint.X, LPoint.Y );
  // Line to point 3
  LPoint.Offset( LXOffset, AHexCellSize.Height div 2 );
  ACanvas.LineTo( LPoint.X, LPoint.Y );
  // Line to point 4
  LPoint.Offset( -LXOffset, AHexCellSize.Height div 2 );
  ACanvas.LineTo( LPoint.X, LPoint.Y );
  // Line to point 5
  LPoint.Offset( -AHexCellSize.SmallWidth, 0 );
  ACanvas.LineTo( LPoint.X, LPoint.Y );
  // Line to point 6
  LPoint.Offset( -LXOffset, -AHexCellSize.Height div 2 );
  ACanvas.LineTo( LPoint.X, LPoint.Y );
  // Line to point 1
  LPoint.Offset( LXOffset, -AHexCellSize.Height div 2 );
  ACanvas.LineTo( LPoint.X, LPoint.Y );
end;

procedure DrawHexCellGrid( ACanvas : TCanvas; AOffSet : TPoint; AHexCellSize : THexCellSize; ACols, ARows : Integer );
var
  LCol, LRow : Integer;
begin
  for LRow := 0 to ARows - 1 do
    for LCol := 0 to ACols - 1 do
      DrawHexCell( ACanvas, AOffSet, AHexCellSize, LCol, LRow );
end;

```