  Gamma-ray bursts (GRBs) are considered as promising sources of
ultra-high-energy cosmic rays (UHECRs) due to their large power output.
Observing a neutrino flux from GRBs would offer evidence that GRBs are hadronic
accelerators of UHECRs. Previous IceCube analyses, which primarily focused on
neutrinos arriving in temporal coincidence with the prompt gamma rays, found no
significant neutrino excess. The four analyses presented in this paper extend
the region of interest to 14 days before and after the prompt phase, including
generic extended time windows and targeted precursor searches. GRBs were
selected between May 2011 and October 2018 to align with the data set of
candidate muon-neutrino events observed by IceCube. No evidence of correlation
between neutrino events and GRBs was found in these analyses. Limits are set to
constrain the contribution of the cosmic GRB population to the diffuse
astrophysical neutrino flux observed by IceCube. Prompt neutrino emission from
GRBs is limited to $\lesssim$1% of the observed diffuse neutrino flux, and
emission on timescales up to $10^4$ s is constrained to 24% of the total
diffuse flux.
