Add cookie scripting functionality