Misplaced Pages

User:Smalleditor/vector.js: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< User:Smalleditor Browse history interactively← Previous editNext edit →Content deleted Content added
Revision as of 05:58, 28 August 2012 view sourceSmalleditor (talk | contribs)1,119 editsNo edit summary← Previous edit Revision as of 14:44, 31 January 2021 view source Ladsgroup (talk | contribs)Extended confirmed users, IP block exemptions, Pending changes reviewers, Rollbackers20,548 editsm Maintenance: Replacing importScriptURI with mw.loader.load (phab:T95964)Next edit →
Line 3: Line 3:
//importScript("User:Symplectic_Map/spell.js"); //importScript("User:Symplectic_Map/spell.js");
importScript("User:GregU/dashes.js"); importScript("User:GregU/dashes.js");
importScriptURI('http://meta.wikimedia.org/search/?title=User:Pathoschild/Scripts/Regex_menu_framework.js&action=raw&ctype=text/javascript'); mw.loader.load('https://meta.wikimedia.org/search/?title=User:Pathoschild/Scripts/Regex_menu_framework.js&action=raw&ctype=text/javascript');
importScript("User:Ohconfucius/script/formatgeneral.js"); importScript("User:Ohconfucius/script/formatgeneral.js");

Revision as of 14:44, 31 January 2021

importScript("User:PleaseStand/segregate-refs.js");
importScript("User:Ohconfucius/test/EngvarB.js");	//Engvar
//importScript("User:Symplectic_Map/spell.js");
importScript("User:GregU/dashes.js");
mw.loader.load('https://meta.wikimedia.org/search/?title=User:Pathoschild/Scripts/Regex_menu_framework.js&action=raw&ctype=text/javascript');
 
importScript("User:Ohconfucius/script/formatgeneral.js"); 
//importScript("User:Smalleditor/test.js");  //Currently Engvar
importScript("User:Ohconfucius/script/formatgeneral.js"); 
importScript("User:Ohconfucius/test/MOSNUM dates.js");
importScript("User:Ohconfucius/script/foreigndates.js");

importScript("User:Ohconfucius/script/Common Terms.js");
importScript("User:Smalleditor/script/Sources.js");
/**** dyk ****/
// ]
importScript('User:Dr pda/prosesize.js'); //]

/**** navpop ****/
// ]
 
importScript('User:Lupin/popups.js');

// Add ] launcher in the toolbox on left
addOnloadHook(function () {
 addPortletLink(
  "p-tb",     // toolbox portlet
  "http://toolserver.org/~dispenser/cgi-bin/webreflinks.py/" + wgPageName 
   + "?client=script&citeweb=on&overwrite=simple&limit=200&lang=" + wgContentLanguage,
  "Reflinks Citeweb"  // link label
)});
addOnloadHook(function () {
 addPortletLink(
  "p-tb",     // toolbox portlet
  "http://toolserver.org/~dispenser/cgi-bin/webreflinks.py/" + wgPageName 
   + "?client=script&overwrite=simple&limit=200&lang=" + wgContentLanguage,
  "Reflinks plain"  // link label
)});

/** ------------------------------------------------------------------------- */
function Ohc_edit_summary1(){
	//Add a tag to the summary box
//	setoptions(minor='true'); 		//removed ",watch='false'" in response to user notification 13 Nov. 2010
	setreason('] fixes, incl. ], ] and ]', 'appendonce');
	doaction('diff');
}

function Ohc_edit_summary2(){
	//Add a tag to the summary box
	setoptions(minor='false',watch='false'); 		
	setreason('] fixes, incl. ], ], ] and ]', 'appendonce');
	doaction('diff');
}
 

function Ohc_insert_tag(){
 var txt=document.editform.wpTextbox1;
// current month-year
    var currentDate = new Date();
    var currmonth = currentDate.getMonth();
    var curryear  = currentDate.getFullYear();
    var myMonths = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
    var curryyyymm = myMonths + ' ' + curryear;
 
// insert 'use British English' template
    txt.value=txt.value.replace(/\{\{(?:use British (?:\(Oxford\) |)English|Engvar)(\|*)?\}\}/gi, '{{Use British English|date='+curryyyymm+'}}');
    txt.value=txt.value.replace(/\{\{(Use (Australian|Indian|Irish|Pakistani|South African) English)(\|*)?\}\}/gi, '{{Use British English|date='+curryyyymm+'}}');
 
    var rxpdd = new RegExp("{{Use British English\\|date="+curryyyymm+"}}", "gi");
    var dflagfound = txt.value.search(rxpdd);
    if (dflagfound == -1)
    {
        txt.value='{{Use British English|date='+curryyyymm+'}}\r\n'+txt.value;
    }
}
function ONETOUCH_ENG() {
 var txt=document.editform.wpTextbox1;
	autoEdFunctions(); //dashes
	Ohc_formatgeneral();
	Ohc_news_sources();
	Ohc_CommonTerms();

	ohc_ISO_to_dmy_in_citations();
//	ohc_protect_strings();
	ohc_protect_dates();
	ohc_fix_unambiguous_dates();
	ohc_body_dates_to_dmy();
	ohc_delink_year_in_X();
//		ohc_customize_all_to_dmy();
		ohc_customize_body_to_dmy();
	ohc_unprotect_dates();
	ohc_delink_ISO_to_dmy();

	ohc_protect_global();
	Ohc_ENGVARSimple();
	zwords();
	ohc_unprotect_global();
	Ohc_insert_tag();

	Ohc_edit_summary2();
}
 
function ONETOUCH_DMY(){
// Add a tag to the summary box
 var txt=document.editform.wpTextbox1;
	autoEdFunctions(); //dashes
	Ohc_formatgeneral();
	Ohc_news_sources();
	Ohc_CommonTerms();
 
//	ohc_protect_strings();
	ohc_protect_dates();
	ohc_fix_unambiguous_dates();
	ohc_body_dates_to_dmy();
	ohc_delink_year_in_X();
//		ohc_customize_all_to_dmy();
		ohc_customize_body_to_dmy();
	ohc_unprotect_dates();
//	ohc_unprotect_strings();
	ohc_publication_dates();
 
	Ohc_edit_summary1();
}
 
function ONETOUCH_MDY(){
// Add a tag to the summary box
 var txt=document.editform.wpTextbox1;
	autoEdFunctions(); //dashes
	Ohc_formatgeneral();
	Ohc_news_sources();
	Ohc_CommonTerms();
 
//	ohc_protect_strings();
	ohc_protect_dates();
	ohc_fix_unambiguous_dates();
	ohc_body_dates_to_mdy();
	ohc_delink_year_in_X();
//		ohc_customize_all_to_mdy();
		ohc_customize_body_to_mdy();
	ohc_unprotect_dates();
//	ohc_unprotect_strings();
	ohc_publication_dates();
 
Ohc_edit_summary1();
}

function ONETOUCH_FMT(){
// Add a tag to the summary box
 var txt=document.editform.wpTextbox1;
	autoEdFunctions(); //dashes
	Ohc_formatgeneral();
	Ohc_news_sources();
	Ohc_CommonTerms();
//	Ohc_edit_summary1();
}
function ohc_publication_dates_driver(){
// Add a tag to the summary box
 var txt=document.editform.wpTextbox1;
	 ohc_publication_dates();
}

// Add ] launcher in the toolbox on left
addOnloadHook(function () {
 addPortletLink(
  "p-tb",     // toolbox portlet
  "http://toolserver.org/~dispenser/cgi-bin/webreflinks.py/" + wgPageName 
   + "?client=script&citeweb=on&overwrite=simple&limit=200&lang=" + wgContentLanguage,
  "Reflinks Citeweb"  // link label
)});
addOnloadHook(function () {
 addPortletLink(
  "p-tb",     // toolbox portlet
  "http://toolserver.org/~dispenser/cgi-bin/webreflinks.py/" + wgPageName 
   + "?client=script&overwrite=simple&limit=200&lang=" + wgContentLanguage,
  "Reflinks plain"  // link label
)});

addOnloadHook(function () {
 if(document.forms.editform) {
  addPortletLink('p-tb', 'javascript:ONETOUCH_ENG()', 'One Touch: ENGVAR', 't-eng', 'Engvar + all', '', '');
  addPortletLink('p-tb', 'javascript:ONETOUCH_DMY()', 'One Touch: DMY', 't-dmy', 'day month + CT', '', '');
  addPortletLink('p-tb', 'javascript:ONETOUCH_MDY()', 'One Touch: MDY', 't-mdy', 'month day + CT', '', '');
  addPortletLink('p-tb', 'javascript:ohc_dmy_publication_dates()', 'Publication dates', 't-mdy', 'Remove ISO publication dates', '', '');
  addPortletLink('p-tb', 'javascript:ONETOUCH_FMT()', 'One Touch: FMT', 't-fmt', 'general fmt, CT + cites', '', '');
  addPortletLink('p-tb', 'javascript:ohc_ISO_to_dmy_anywhere()', 'ALL ISO DMY', 't-dmy', 'day month', '', '');
  addPortletLink('p-tb', 'javascript:ohc_ISO_to_mdy_anywhere()', 'ALL ISO MDY', 't-mdy', 'month day', '', '');
  addPortletLink('p-tb', 'javascript:Ohc_access_dates_to_ISO()', 'ACCESS dates to ISO', 't-ISO', 'ISO day month', '', '');
 addPortletLink('p-tb', 'javascript:ohc_protect_dates()', 'protect strings', 't-dmy', 'day month', '', '');
  }
});