A safety mechanism for preventing door slamming includes a board and a pivot extending from the board. A rotatable arm is attached at a first end to the pivot. Door arresting wedge (AW) is attached substantially perpendicularly to the second end of the arm. One or more magnets are disposed on the board for attracting the arm. One or more magnets disposed on an edge of the arm, and a matching stopper is used to limit the rotation of the arm.