From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.

//<nowiki>

/*

* WARNING: THIS IS A TEST FORK OF EASYTEMPLATES. THERE IS NO GUARANTEE THAT THIS SCRIPT WILL FUNCTION, AS IT IS SOLEY FOR 

* DEVELOPMENT PURPOSES. IF YOU ARE HERE BY MISTAKE, THE DOCUMENTATION FOR THIS SCRIPT CAN BE 

* FOUND AT: /info/en/?search=User:Vghfr/EasyTemplates. THE MAIN SCRIPT CAN BE FOUND

* AT: /info/en/?search=User:Vghfr/EasyTemplates/Easytemplates.js

*/



$( document ).ready( function () { 

	const mwUtil = mw.util;

$.getJSON('/info/en/?search=User:Vghfr/EasyTemplates/Templates.json?action=raw&ctype=application/json')

//	const obj = JSON.parse(jsonData);





const menuPlainText = 

	'Citation', 

	'Cleanup',

	'Copyedit',

	'Timing',

	'Expansion'

	];

const menuID = 

	'pt-Citation',

	'pt-Cleanup',

	'pt-Copyedit',

	'pt-Timing',

	'pt-Expansion'

	];

/*const template = 



'{{more citations needed}}',

'{{cleanup|reason=',

'{{current}}',

'{{copy edit}}',

'{{Missing information|'

];*/

//var isUserEditing = document.getElementById("editform");



	function citation(){



		document.editform.wpTextbox1.value = data.citation0].name + "\n" + document.editform.wpTextbox1.value;

	

	}

	function cleanup(){

		 let reason = window.prompt("Enter the reason for cleanup",'Reason');

		document.editform.wpTextbox1.value = template1 + reason+"}}"+"\n" + document.editform.wpTextbox1.value;

		

	}

	function copyedit(){

		

		document.editform.wpTextbox1.value = template2 + "\n" + document.editform.wpTextbox1.value;

		

	}

	function timing(){

		

		document.editform.wpTextbox1.value = template3 + "\n" + document.editform.wpTextbox1.value;

		

	}

	function expand(){

		

	    let text = window.prompt("What is the subject that requires expansion?",'Subject');

		document.editform.wpTextbox1.value = template4 + text+"}}"+"\n" + document.editform.wpTextbox1.value;

		

	}

	





//Initialization code

mw.util.addPortlet('p-easyTJSON', 'EasyTemplates (Test Version)', '#p-cactions');

let menuGenStep = menuPlainText.length-menuPlainText.length;

while (menuGenStep < menuPlainText.length){

	mw.util.addPortletLink('p-easyTJSON', "javascript:"+ menuPlainTextmenuGenStep].toLowerCase()+"();", menuPlainTextmenuGenStep],menuIDmenuGenStep]);

	menuGenStep++;

}

mw.util.addPortletLink('p-easyTJSON', 'https://en.wikipedia.org/?title=User:Vghfr/EasyTemplates/Easytemplates.js', 'Script (dev link)');



//Insertion code will run here.





});

//</nowiki>
From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.

//<nowiki>

/*

* WARNING: THIS IS A TEST FORK OF EASYTEMPLATES. THERE IS NO GUARANTEE THAT THIS SCRIPT WILL FUNCTION, AS IT IS SOLEY FOR 

* DEVELOPMENT PURPOSES. IF YOU ARE HERE BY MISTAKE, THE DOCUMENTATION FOR THIS SCRIPT CAN BE 

* FOUND AT: /info/en/?search=User:Vghfr/EasyTemplates. THE MAIN SCRIPT CAN BE FOUND

* AT: /info/en/?search=User:Vghfr/EasyTemplates/Easytemplates.js

*/



$( document ).ready( function () { 

	const mwUtil = mw.util;

$.getJSON('/info/en/?search=User:Vghfr/EasyTemplates/Templates.json?action=raw&ctype=application/json')

//	const obj = JSON.parse(jsonData);





const menuPlainText = 

	'Citation', 

	'Cleanup',

	'Copyedit',

	'Timing',

	'Expansion'

	];

const menuID = 

	'pt-Citation',

	'pt-Cleanup',

	'pt-Copyedit',

	'pt-Timing',

	'pt-Expansion'

	];

/*const template = 



'{{more citations needed}}',

'{{cleanup|reason=',

'{{current}}',

'{{copy edit}}',

'{{Missing information|'

];*/

//var isUserEditing = document.getElementById("editform");



	function citation(){



		document.editform.wpTextbox1.value = data.citation0].name + "\n" + document.editform.wpTextbox1.value;

	

	}

	function cleanup(){

		 let reason = window.prompt("Enter the reason for cleanup",'Reason');

		document.editform.wpTextbox1.value = template1 + reason+"}}"+"\n" + document.editform.wpTextbox1.value;

		

	}

	function copyedit(){

		

		document.editform.wpTextbox1.value = template2 + "\n" + document.editform.wpTextbox1.value;

		

	}

	function timing(){

		

		document.editform.wpTextbox1.value = template3 + "\n" + document.editform.wpTextbox1.value;

		

	}

	function expand(){

		

	    let text = window.prompt("What is the subject that requires expansion?",'Subject');

		document.editform.wpTextbox1.value = template4 + text+"}}"+"\n" + document.editform.wpTextbox1.value;

		

	}

	





//Initialization code

mw.util.addPortlet('p-easyTJSON', 'EasyTemplates (Test Version)', '#p-cactions');

let menuGenStep = menuPlainText.length-menuPlainText.length;

while (menuGenStep < menuPlainText.length){

	mw.util.addPortletLink('p-easyTJSON', "javascript:"+ menuPlainTextmenuGenStep].toLowerCase()+"();", menuPlainTextmenuGenStep],menuIDmenuGenStep]);

	menuGenStep++;

}

mw.util.addPortletLink('p-easyTJSON', 'https://en.wikipedia.org/?title=User:Vghfr/EasyTemplates/Easytemplates.js', 'Script (dev link)');



//Insertion code will run here.





});

//</nowiki>

Videos

Youtube | Vimeo | Bing

Websites

Google | Yahoo | Bing

Encyclopedia

Google | Yahoo | Bing

Facebook