User:DaxServer/BooksToSfn
Description | Converts a {{cite book}} to use {{Sfn}} |
---|---|
Author(s) | DaxServer |
Status | Release candidate |
First released | October 25, 2021 |
Updated | October 28, 2021 |
Browser support | Brave, Google Chrome, Firefox |
Skin support | Vector |
Source | User:DaxServer/BooksToSfn.js |
The script will add a "Books to Sfn" portlet link in Visual Editor's source mode editing, in main namespace articles or in the user's Sandbox. When clicked, it converts one {{cite book}}
inside a <ref>...</ref>
tag block into an {{Sfn}}
.
The script looks for a level-2/3 "Bibliography" section with a {{
Capabilities
The script is capable of identifying the last names required by {{Sfn}}
in this order:
last
last1
...lastn
author
author1
...authorn
editor
editor1
...editorn
The script is capable of identifying year from the parameters year
or date
. It is capable of identifying page numbers from the parameters page
or pages
.
Installation instructions
Hint: It's much easier if you get ScriptInstaller, then navigate to User:DaxServer/BooksToSfn.js and click "Install" at the top.
However, here's the manual method:
- Place
{{
subst:iusc|User:DaxServer/BooksToSfn.js}} on Special:MyPage/common.js or a skin-specific page, like Special:MyPage/vector.js. - Clear your cacheand enjoy!