User:Nardog/TemplatePreviewGuard

Have you ever used the "Preview page with this template" feature and wondered why your changes weren't being reflected in the preview only to realize you were editing the wrong template? If you have, this script is for you. It'll show you a confirmation dialog if you click "Show preview" under "Preview page with this template" and the entered page doesn't transclude the page being edited.

Installation
Add the following to your common.js or global.js:

Or you may enable the script installer in and click "Install" in the infobox on this page.