Thermal transformation of local to extended electronic states in polymers