Discourse close & archive topic userscript

Wait… so how do I run this? Where should I place it?