Description | Warns when you try to use "Preview page with this template" with a page that doesn't transclude the template |
---|---|
Updated | May 10, 2024 (6 months ago) |
Browsers | Chrome, Firefox, etc. |
Source | User:Nardog/TemplatePreviewGuard.js |
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
editAdd the following to your common.js or global.js:
mw.loader.load('//en.wiki.x.io/w/index.php?title=User:Nardog/TemplatePreviewGuard.js&action=raw&ctype=text/javascript');
Or you may enable the script installer in Preferences → Gadgets and click "Install" in the infobox on this page.