Jump to content

User:LinguistAtLarge/splitconvobutton.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by LinguistAtLarge (talk | contribs) at 03:09, 24 April 2009 (try). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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.
var splitconvobutton = function()
{
	var tb = document.getElementById('toolbar');
	if (typeof(tb) != 'undefined' && typeof(addButton) == 'function')
	{
		alert('adding button');
/*		var img = document.createElement('img');
		img.setAttribute('style', 'cursor: pointer;');
		img.setAttribute('title', 'Insert split conversation template');
		img.setAttribute('alt', 'Insert split conversation template');
		img.setAttribute('src', '/media/wikipedia/commons/d/da/Broken_conversation_button.png');
		img.setAttribute('id', 'mw-editbutton-splitconvo');
		img.setAttribute('class', 'mw-toolbar-editbutton');
		img.setAttribute('width', '32');
		img.setAttribute('border', '0');
		img.setAttribute('height', '22');
		tb.appendChild(img); */
		addButton(
			"/media/wikipedia/commons/d/da/Broken_conversation_button.png",
			"Insert split conversation template",
			"\n\{\{User\:LinguistAtLarge\/Splitconvo\|1=",
			"\}\}\n",
			"http://",
			"mw-editbutton-splitconvo"
		);
		alert('done adding button');
	}
};
addOnloadHook(splitconvobutton);