When painting wood next to glass?

I want to paint my door frames that have glass inserts. What can I use to mask off the glass to avoid getting piant on it.? Ive tried masking tapes but they just come straight off!