In a medium saucepan, combine the sugar and cocoa powder and whisk briefly to break up any clumps. Stir in the water and salt and bring to a boil over medium-high heat, stirring frequently. Once the mixture reaches a boil, reduce the heat to medium-low and let simmer until slightly thickened, about 5 minutes. Remove from the heat and let stand for 5 minutes. Stir in the vanilla. Store in the refrigerator.