Get an outdoor-rated, thick gauge extension cord and plug it into a GFCI outlet. There is a teeny-tiny chance of electric shock during thunderstorms, but GFCI will shut the circuit quickly, usually. Consult an electrician before doing this. Or just get a GFCI outlet installed near the toilet. That's safer!