User:King of Hearts/closeffd.js

Today, User:King of Hearts/closeffd.js is a highly relevant topic that has gained great importance in various areas of society. The importance of User:King of Hearts/closeffd.js lies in its impact on people's daily lives, as well as its influence on global decision-making. In this article, we will explore the implications of User:King of Hearts/closeffd.js in depth, analyzing its causes, effects, and possible solutions. From its origins to its current situation, User:King of Hearts/closeffd.js has been the subject of debate and reflection, playing a crucial role in shaping the world we live in. Through a multidisciplinary approach, we will try to shed light on the various aspects surrounding User:King of Hearts/closeffd.js, with the aim of providing our readers with a complete and updated vision of this very relevant topic.
// closeffd.js - written by ], modified from
// ] by ]
// and ] by ]

function autoffd_result()
{
	var close = prompt("Result of debate?")
	var f = document.editform, t = f.wpTextbox1;
	t.value = t.value.split(']]====').join(']]====' + '\n' + '{{subst:' + 'ffd top' + '|' + '\'' + '\'' + '\'' + close + '\'' + '\'' + '\'' + '.}}' + ' ~~' + '~~');
	t.value += "{{subst:" + "ffd bottom" + "}}";
	f.wpSummary.value += "Closing debate; result was " + close;
}

function autoffd_add_ffd_tabs()
{
	// Only add for pages with the right string somewhere in the title
	if ((document.title.indexOf("Editing Wikipedia:Files for deletion/") != -1) && (document.title.indexOf("(section)") != -1))
	{
		mw.util.addPortletLink('p-cactions', 'javascript:autoffd_result()', "close");
	}
}
 
$(autoffd_add_ffd_tabs);