www.redditstatic.com/shreddit/*xpromo-nsfw-blocking-modal-desktop-*.js
A Ublock filter would look like this
www.redditstatic.com/shreddit/*xpromo-nsfw-blocking-modal-desktop-*.js$script,domain=www.reddit.com
www.reddit.com##div.prompt
The only reason you should not be using the filter is if it has an impact on other areas.
Use Tampermonkey to load the userscript, it is more precise than the Ublock filter.\