//importScript('"User:OhconfuciusD'Ranged 1/script/MOSNUM dates.js'"); //[[User:OhconfuciusD'Ranged 1/script/MOSNUM dates.js]]
//importScript('User:Odie5533/doctoparameter.py'); //[[User:Odie5533/doctoparameter.py]]
//importScript('User:Odie5533/SnipManager.user.js');
importScript("User:D'Ranged 1/script/CustomRefToolbar.js");
importScript("User:Ohconfucius/script/MOSNUM dates.js"); //[[User:Ohconfucius/script/MOSNUM dates.js]]
// importScript("User:D'Ranged 1/script/SnipManager.js");
/*importScript("User:D'Ranged 1/script/Gadget-refToolbar.js");
importScript("User:D'Ranged 1/script/Gadget-refToolbarBase.js");
importScript("User:D'Ranged 1/script/RefToolbar.js");
importScript("User:D'Ranged 1/script/refToolbarConfig.js");
importScript("User:D'Ranged 1/script/refToolbarMessages-en.js");
*/
/* RefToolbar - custom dialogs
*/
$('head').one('reftoolbarbase', function() {
CiteTB.UserOptions['date format'] = "<monthname> <date>, <year>";
CiteTB.UserOptions['autodate fields'] = ['dateaccessdate', 'accessdatearchivedate', 'archivedatedate'];
CiteTB.UserOptions['expandtemplates'] = true;
CiteTB.UserOptions['autoparse'] = true;
});
// Add [[WP:Reflinks]] launcher in the toolbox on left
$.when( mw.loader.using( 'mediawiki.util' ), $.ready ).then( function () {
// Cite template definitions
mw.util.addPortletLink(
new citeTemplate('cite web', 'web2',
"p-tb", // toolbox portlet
[ // Basic fields
"//toolserver.org/~dispenser/cgi-bin/webreflinks.py/" + mw.config.get('wgPageName')
{"field": "title", "autofillprop":"title"},
+ "?client=script&citeweb=on&overwrite=&limit=20&lang=" + mw.config.get('wgContentLanguage'),
{"field": "date", "autofillprop":"date"},
"Reflinks" // link label
{"field": "first", "autofillprop":"first1"},
)});
{"field": "last", "autofillprop":"last1"},
{"field": "author-link", "tooltip":"cite-author-link-tooltip"},
{"field": "accessdate"},
{"field": "first2", "autofillprop":"first2"},
{"field": "last2", "autofillprop":"last2"},
{"field": "author-link2", "tooltip":"cite-author-link-tooltip"},
{"field": "year"},
{"field": "url"},
{"field": "archive-url"},
{"field": "archive-date"},
{"field": "deadurl"},
{"field": "work", "tooltip": "cite-work-tooltip", "autofillprop":"journal"},
{"field": "format"},
{"field": "publisher"},
{"field": "___location"},
{"field": "language"},
{"field": "trans-title"},
{"field": "quote"},
{"field": "doi", "autofillid":"doi"}
],
[ // Expanded fields
{"field": "editor-first"},
{"field": "editor-last"},
{"field": "editor-link", "tooltip":"cite-editor-link-tooltip"},
{"field": "others"},
{"field": "editor-first2"},
{"field": "editor-last2"},
{"field": "editor-link2", "tooltip":"cite-editor-link-tooltip"},
{"field": "page", "tooltip":"cite-page-tooltip"},
{"field": "pages", "autofillprop":"pages", "tooltip":"cite-pages-tooltip"}
]);
new citeTemplate('cite news', 'news2',
[ // Basic fields
{"field": "title"},
{"field": "date"},
{"field": "first"},
{"field": "last"},
{"field": "author-link", "tooltip":"cite-author-link-tooltip"},
{"field": "accessdate"},
{"field": "first2", "autofillprop":"first2"},
{"field": "last2", "autofillprop":"last2"},
{"field": "author-link2", "tooltip":"cite-author-link-tooltip"},
{"field": "url"},
{"field": "archive-url"},
{"field": "archive-date"},
{"field": "deadurl"},
{"field": "newspaper"},
{"field": "agency"}
],
[ // Expanded fields
{"field": "editor-first"},
{"field": "editor-last"},
{"field": "editor-link", "tooltip":"cite-editor-link-tooltip"},
{"field": "others"},
{"field": "editor-first2"},
{"field": "editor-last2"},
{"field": "editor-link2", "tooltip":"cite-editor-link-tooltip"},
{"field": "___location"},
{"field": "language"},
{"field": "trans-title"},
{"field": "page", "tooltip":"cite-page-tooltip"},
{"field": "pages", "autofillprop":"pages", "tooltip":"cite-pages-tooltip"},
{"field": "format"},
{"field": "doi"},
{"field": "quote"}
]);
new citeTemplate('cite book', 'book2',
[ // Basic fields
{"field": "title", "autofillprop":"title"},
{"field": "date", "autofillprop":"year"},
{"field": "first", "autofillprop":"first1"},
{"field": "last", "autofillprop":"last1"},
{"field": "author-link", "tooltip":"cite-author-link-tooltip"},
{"field": "isbn", "autofillid":"isbn"},
{"field": "accessdate"},
{"field": "url"},
{"field": "archive-url"},
{"field": "archive-date"},
{"field": "deadurl"},
{"field": "page", "tooltip":"cite-page-tooltip"},
{"field": "pages", "autofillprop":"pages", "tooltip":"cite-pages-tooltip"},
{"field": "publisher", "autofillprop":"publisher"},
{"field": "___location", "autofillprop":"___location"},
{"field": "edition", "autofillprop":"edition"},
{"field": "quote"}
],
[ // Expanded fields
{"field": "first2", "autofillprop":"first2"},
{"field": "last2", "autofillprop":"last2"},
{"field": "author-link2", "tooltip":"cite-author-link-tooltip"},
{"field": "year"},
{"field": "editor-first"},
{"field": "editor-last"},
{"field": "editor-link", "tooltip":"cite-editor-link-tooltip"},
{"field": "others"},
{"field": "editor-first2"},
{"field": "editor-last2"},
{"field": "editor-link2", "tooltip":"cite-editor-link-tooltip"},
{"field": "format"},
{"field": "language"},
{"field": "trans-title"},
{"field": "chapter"}
]);
new citeTemplate('cite journal', 'journal2',
[ // Basic fields
{"field": "title", "autofillprop":"title"},
{"field": "date", "autofillprop":"date"},
{"field": "first", "autofillprop":"first1"},
{"field": "last", "autofillprop":"last1"},
{"field": "author-link", "tooltip":"cite-author-link-tooltip"},
{"field": "accessdate"},
{"field": "first2", "autofillprop":"first2"},
{"field": "last2", "autofillprop":"last2"},
{"field": "author-link2", "tooltip":"cite-author-link-tooltip"},
{"field": "doi", "autofillid":"doi"},
{"field": "journal", "autofillprop":"journal"},
{"field": "volume", "autofillprop":"volume"},
{"field": "series"},
{"field": "issue", "autofillprop":"issue"},
{"field": "page", "tooltip":"cite-page-tooltip"},
{"field": "pages", "autofillprop":"pages", "tooltip":"cite-pages-tooltip"},
{"field": "pmid", "autofillid":"pmid"},
{"field": "pmc"},
{"field": "url"},
{"field": "archive-url"},
{"field": "archive-date"},
{"field": "deadurl"}
],
[ // Expanded fields
{"field": "editor-first"},
{"field": "editor-last"},
{"field": "editor-link", "tooltip":"cite-editor-link-tooltip"},
{"field": "others"},
{"field": "editor-first2"},
{"field": "editor-last2"},
{"field": "editor-link2", "tooltip":"cite-editor-link-tooltip"},
{"field": "at", "tooltip":"cite-at-tooltip"},
{"field": "language"},
{"field": "trans-title"},
{"field": "publisher"},
{"field": "___location"},
{"field": "format"},
{"field": "year"},
{"field": "issn"},
{"field": "oclc"},
{"field": "bibcode"},
{"field": "id"},
{"field": "quote"},
{"field": "ref", "tooltip":"cite-ref-tooltip"},
{"field": "postscript", "tooltip":"cite-postscript-tooltip"}
]);
mw.usability.addMessages( {
/*
'cite-section-label' : 'Cite',
'cite-template-list' : 'Templates',
'cite-named-refs-label' : 'Named references',
'cite-named-refs-title' : 'Insert a named reference',
'cite-named-refs-button' : 'Named references',
'cite-named-refs-dropdown' : 'Named references', // Used on the top of the named refs list dropdown
'cite-errorcheck-label' : 'Error check',
'cite-errorcheck-button' : 'Check for errors',
*/
'cite-dialog-web2' : 'Web citation',
'cite-dialog-news2' : 'News citation',
'cite-dialog-book2' : 'Book citation',
'cite-dialog-journal2' : 'Journal citation',
/*
'cite-form-submit' : 'Insert',
'cite-form-showhide' : 'Show/hide extra fields',
'cite-no-namedrefs' : 'Cannot find any named references on the page',
'cite-namedrefs-intro' : "Select a name from the list to see the ref content. Click 'Insert' to insert a reference to it in the text.",
'cite-raw-preview' : 'Wikitext:',
'cite-parsed-label' : 'Parsed wikitext:',
'cite-form-parse' : 'Show parsed preview',
'cite-refpreview' : 'Preview',
'cite-name-label' : 'Ref name',
'cite-group-label' : 'Ref group',
'cite-errorcheck-submit' : 'Check',
'cite-errorcheck-heading' : 'Check for the following errors:',
'cite-error-unclosed' : 'Unclosed <span style="font-family:monospace"><ref></span> tags',
'cite-error-samecontent' : 'References with the same content',
'cite-error-templates' : 'References not using a <a href="//en.wikipedia.org/wiki/Wikipedia:Citation_templates">citation template</a>',
'cite-error-repeated' : 'Multiple references with the same name',
'cite-error-undef' : 'Usage of undefined named references',
'cite-error-samecontent-msg' : 'Multiple refs contain the same content: $1',
'cite-error-repeated-msg' : 'Multiple refs are given the name: \'$1\'',
'cite-error-templates-msg' : 'Does not use a template: $1',
'cite-form-reset' : 'Reset form',
'cite-loading' : 'Loading data', // Shown while pagetext is being downloaded from the API
'cite-insert-date' : 'Insert current date', // Alt/title text for 'insert date' icon
'cite-err-report-heading' : 'Citation error report', // Heading for error report table
'cite-err-report-close' : 'Close', // Alt/title text for 'close' icon on error report
'cite-err-report-empty' : 'No errors found', // Message displayed in the error report list if there are no errors
'cite-autofill-alt' : 'Autofill', // Alt text for autofill button image
'cite-at-tooltip' : 'Position within the resource (when page is inappropriate)',
'cite-author-link-tooltip' : 'If the author has a Wikipedia article, the name of the article',
'cite-editor-link-tooltip' : 'If the editor has a Wikipedia article, the name of the article',
'cite-pages-tooltip' : 'Pages in the source that supports the content; separate page ranges with an en dash (–); separate non-sequential pages with a comma (,); do not use to indicate the total number of pages in the source.',
'cite-page-tooltip' : 'Page in the source that supports the content.',
'cite-postscript-tooltip' : 'If specified, overrides the default behavior of terminating the citation with a period',
'cite-ref-tooltip' : 'ID for anchor (for creating a linkable reference)',
'cite-work-tooltip' : 'Name of journal, magazine, newspaper, periodical or website',
'cite-samecontent-desc' : 'References with the same content',
'cite-samecontent-error' : 'Multiple references contain the same content',
'cite-repeated-desc' : 'Multiple references with the same name',
'cite-repeated-error' : 'Multiple references are using the same name',
'cite-undefined-desc' : 'Usage of undefined named references',
'cite-undefined-error' : 'A named reference is used but not defined',
*/
'cite-accessdate-label' : 'Access date',
'cite-agency-label' : 'Agency',
'cite-archive-date-label' : 'Archive date',
'cite-archive-url-label' : 'Archive URL',
'cite-at-label' : 'At',
'cite-author-link-label' : "Author's article",
'cite-author-link2-label' : "2nd Author's article",
'cite-bibcode-label' : 'Bibcode',
'cite-chapter-label' : 'Chapter',
'cite-date-label' : 'Date',
'cite-deadurl-label' : "Dead url?",
'cite-doi-label' : 'DOI',
'cite-edition-label' : 'Edition',
'cite-editor-first2-label' : "2nd Editor's first",
'cite-editor-first-label' : "Editor's first",
'cite-editor-last2-label' : "2nd Editor's last",
'cite-editor-last-label' : "Editor's last",
'cite-editor-link2-label' : "2nd Editor's article",
'cite-editor-link-label' : "Editor's article",
'cite-first-label' : "Author's first",
'cite-first2-label' : "2nd Author's first",
'cite-format-label' : 'Format',
'cite-id-label' : 'ID',
'cite-isbn-label' : 'ISBN',
'cite-issn-label' : 'ISSN',
'cite-issue-label' : 'Issue',
'cite-journal-label' : 'Journal',
'cite-language-label' : 'Language',
'cite-last-label' : "Author's last",
'cite-last2-label' : "2nd Author's last",
'cite-___location-label' : 'Location',
'cite-month-label' : 'Month',
'cite-newspaper-label' : 'Newspaper',
'cite-oclc-label' : 'OCLC',
'cite-others-label' : 'Others',
'cite-page-label' : 'Page',
'cite-pages-label' : 'Pages',
'cite-pmc-label' : 'PMC',
'cite-pmid-label' : 'PMID',
'cite-postscript-label' : 'Postscript',
'cite-publisher-label' : 'Publisher',
'cite-quote-label' : 'Quote',
'cite-ref-label' : 'Ref',
'cite-series-label' : 'Series',
'cite-title-label' : 'Title',
'cite-trans-title-label' : 'Translated title',
'cite-url-label' : 'URL',
'cite-volume-label' : 'Volume',
'cite-work-label' : 'Work',
'cite-year-label' : 'Year'
});
});
|