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.

/* <pre><nowiki> */



var fsection = '0';

var aclass;

var iclass;



function doQft(iclass) {

        if (!iclass) {

	aclass = prompt('Type Class:');

	if (!aclass) {

		return;

	}

        } else {

        aclass = iclass;

        }

	/*

    var nurl = 'http://en.wikipedia.org/?title=Talk:' + getPname() + '&action=edit' + '&section=' + section;

	document.location = nurl;

	*/

	document.getElementById('bodyContent').innerHTML = 'Please wait' + '...';

	gml_xmlhttp = HTTPClient();

	if (!gml_xmlhttp) {

		return;

	}

	document.getElementById('bodyContent').innerHTML += '<br />Grabbing page...';

	gml_xmlhttp.open('GET', 'http://en.wikipedia.org/?title=Talk:' + getPname() + '&action=edit' + '&section=' + fsection + '', true);

	gml_xmlhttp.onreadystatechange = doQft_more;

	gml_xmlhttp.send(null);

}



function doQft_more() {

	if (gml_xmlhttp.readyState != 4){

		document.getElementById('bodyContent').innerHTML += '.';

		return

	}

	var form, newform, l;

	doc = gml_XMLParse(gml_xmlhttp.responseText);

	form = doc.getElementById('editform');



	var x;

	var t = form.wpTextbox1.value;

	myArray = t.split(" ");

	var addClass;

	addClass = false;

	document.getElementById('bodyContent').innerHTML += '<br />Searching for existing tag...';

	var testTag = "{{FilmsWikiProject}}";

	for (x in myArray) {

		myArray2 = myArrayx].split(/\n/);

		for (y in myArray2) {

			if (myArray2y == testTag) {

				addClass = true;

			}

		}

	}

	if (addClass == true) {

		document.getElementById('bodyContent').innerHTML += '<br />Adding class to FilmsWikiProject tag...';

	} else {

		document.getElementById('bodyContent').innerHTML += '<br />FilmsWikiProject Tag already modified...';

		return;

	}

	allData = form.wpTextbox1.value;

	form.wpTextbox1.value = allData.replace(/{{FilmsWikiProject}}/, "{{FilmsWikiProject|class="+aclass+"}}");

	//alert("Test Data:" + form.wpTextbox1.value);

	form.wpSummary.value = 'Changed {{FilmsWikiProject}} tag with a class';

	newform = document.createElement('form');

	l = form.getElementsByTagName('textarea');

	for (i = l.length; i--; ) {

		var t = document.createElement('input');

		t.type = 'hidden';

		t.name = li].name;

		t.value = li].value;

		newform.appendChild(t);

	}

	l = form.getElementsByTagName('input');

	for (i = l.length; i--; ) {

		if (li].name == 'wpSummary') {

			li].value = 'Changed {{FilmsWikiProject}} tag with a class';

		} else if (li].name == 'wpMinoredit') {

			li].value = '1';

		} else if (li].name == 'wpWatchthis') {

			if (!li].checked) {

				continue;

			}

			li].value = "on";

		} else if (li].name == 'wpPreview') {

			continue;

		} else if (li].name == 'wpDiff') {

			continue;

		}

		li].type = 'hidden';

		newform.appendChild(li]);

	}

	newform.name = form.name;

	newform.method = form.method;

	newform.id = form.id;

	newform.action = form.action;

	document.getElementById('bodyContent').innerHTML += '<br />Submitting form...';

	document.getElementById('bodyContent').appendChild(newform);

	// Submit the form

	newform.submit();

}



/* </nowiki></pre> */
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.

/* <pre><nowiki> */



var fsection = '0';

var aclass;

var iclass;



function doQft(iclass) {

        if (!iclass) {

	aclass = prompt('Type Class:');

	if (!aclass) {

		return;

	}

        } else {

        aclass = iclass;

        }

	/*

    var nurl = 'http://en.wikipedia.org/?title=Talk:' + getPname() + '&action=edit' + '&section=' + section;

	document.location = nurl;

	*/

	document.getElementById('bodyContent').innerHTML = 'Please wait' + '...';

	gml_xmlhttp = HTTPClient();

	if (!gml_xmlhttp) {

		return;

	}

	document.getElementById('bodyContent').innerHTML += '<br />Grabbing page...';

	gml_xmlhttp.open('GET', 'http://en.wikipedia.org/?title=Talk:' + getPname() + '&action=edit' + '&section=' + fsection + '', true);

	gml_xmlhttp.onreadystatechange = doQft_more;

	gml_xmlhttp.send(null);

}



function doQft_more() {

	if (gml_xmlhttp.readyState != 4){

		document.getElementById('bodyContent').innerHTML += '.';

		return

	}

	var form, newform, l;

	doc = gml_XMLParse(gml_xmlhttp.responseText);

	form = doc.getElementById('editform');



	var x;

	var t = form.wpTextbox1.value;

	myArray = t.split(" ");

	var addClass;

	addClass = false;

	document.getElementById('bodyContent').innerHTML += '<br />Searching for existing tag...';

	var testTag = "{{FilmsWikiProject}}";

	for (x in myArray) {

		myArray2 = myArrayx].split(/\n/);

		for (y in myArray2) {

			if (myArray2y == testTag) {

				addClass = true;

			}

		}

	}

	if (addClass == true) {

		document.getElementById('bodyContent').innerHTML += '<br />Adding class to FilmsWikiProject tag...';

	} else {

		document.getElementById('bodyContent').innerHTML += '<br />FilmsWikiProject Tag already modified...';

		return;

	}

	allData = form.wpTextbox1.value;

	form.wpTextbox1.value = allData.replace(/{{FilmsWikiProject}}/, "{{FilmsWikiProject|class="+aclass+"}}");

	//alert("Test Data:" + form.wpTextbox1.value);

	form.wpSummary.value = 'Changed {{FilmsWikiProject}} tag with a class';

	newform = document.createElement('form');

	l = form.getElementsByTagName('textarea');

	for (i = l.length; i--; ) {

		var t = document.createElement('input');

		t.type = 'hidden';

		t.name = li].name;

		t.value = li].value;

		newform.appendChild(t);

	}

	l = form.getElementsByTagName('input');

	for (i = l.length; i--; ) {

		if (li].name == 'wpSummary') {

			li].value = 'Changed {{FilmsWikiProject}} tag with a class';

		} else if (li].name == 'wpMinoredit') {

			li].value = '1';

		} else if (li].name == 'wpWatchthis') {

			if (!li].checked) {

				continue;

			}

			li].value = "on";

		} else if (li].name == 'wpPreview') {

			continue;

		} else if (li].name == 'wpDiff') {

			continue;

		}

		li].type = 'hidden';

		newform.appendChild(li]);

	}

	newform.name = form.name;

	newform.method = form.method;

	newform.id = form.id;

	newform.action = form.action;

	document.getElementById('bodyContent').innerHTML += '<br />Submitting form...';

	document.getElementById('bodyContent').appendChild(newform);

	// Submit the form

	newform.submit();

}



/* </nowiki></pre> */

Videos

Youtube | Vimeo | Bing

Websites

Google | Yahoo | Bing

Encyclopedia

Google | Yahoo | Bing

Facebook