if (wplgbtAddText == null) var wplgbtAddText = '{'+'{LGBTProject|class=?|explanation=?}'+'}\n\n';
if (wplgbtSummary == null) var wplgbtSummary = 'Add [[WP:LGBT]] project tag';
function addwplgbtText() {
var box = document.getElementById('wpTextbox1');
var content = box.value;
content = wplgbtAddText + content;
box.value = content;
var sumBox = document.getElementById('wpSummary');
sumBox.value = wplgbtSummary;
}
function goTowplgbt() {
var url = mw.config.get('wgServer') + mw.config.get('wgScript') + '?title=' + wgPageName + '&action=edit&addwplgbt=true';
window.location = url;
}
function attachwplgbtLink() {
var wplgbtLink = new wa_element('li');
wplgbtLink.ele_obj.id = 't-wplgbt';
wplgbtLink.ele_obj.innerHTML = '<a href="#" title="Add WP LGBT tag">Add WP LGBT tag</a>';
wplgbtLink.addScriptEvent('click', function() { goTowplgbt(); });
wplgbtLink.attach(document.getElementById('pt-userpage'), 'before');
}
importScript('User:Ale_jrb/Scripts/waLib.js');
hookEvent('load', attachwplgbtLink);
if (window.location.href.indexOf('&addwplgbt=true') > -1) { hookEvent('load', addwplgbtText); }