User:Ahecht/Scripts/refrescue
Appearance
< User:Ahecht | Scripts
| Description | Compiles a list of missing references, and extracts those references from another page. |
|---|---|
| Author | Ahecht |
| Status | Release |
| Updated | October 1, 2026 |
| Skins | Vector |
| Source Beta | User:Ahecht/Scripts/refrescue.js User:Ahecht/sandbox/Scripts/refrescue.js |
A userscript to help resolve Cite error: The named reference foo was invoked but never defined and harvp/sfn error: no target: CITEREFFoo errors that can occur after merging, splitting, or excerpting.
Installation instructions
[edit]- Edit Special:MyPage/common.js or a skin-specific page, like Special:MyPage/vector.js.
- Paste the following text into it:
mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Ahecht/Scripts/refrescue.js&action=raw&ctype=text/javascript' ); // RefRescue [[:en:User:Ahecht/Scripts/refrescue.js]]
- Clear your cache and enjoy!
Usage
[edit]This script has two parts:
- Gather missing refs: Run on the page with missing refs, and it creates a comma-separated list of reference names (e.g.
foo,bar,baz) for you to copy. This option appears in Tools menu of pages with missing reference errors. - Rescue refs: Run on the original page that contained the references (the merge, split, or excerpt source) while in "Edit" mode. It will ask you to paste in the list of reference named from the previous step, and then will pop up a dialogue box with the source for those references as well as a list of references it could not find. This option appears in the tools menu while the source editor is open. It will not appear when reading an article or with VisualEditor.
The list of references produced by Rescue refs can be inserted into the new page as List-defined references or, for harv/sfn referencing, in a bulleted list of full citations.