MediaWiki:Gadget-LiveRC 1x.js/InserisciTemplate.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m +templates
Dr. Brains modif
Riga 459:
 
function lrcRunInsertTemplate(data){
TagBar = document.getElementById("LiveTagForm");
var TagInput = document.getElementById('LiveTagLink');
TagInput.onclick = function(){ myGetLiveTag(data.page); return false; };
TagInput.onselect = function(){ myGetLiveTag(data.page); return false; };
var TagSelect = document.getElementById('LiveTagReason');
// empty the options list
TagSelect.options.length = 0;
 
jQuery.each(lstMyTemplate, function(i, val) {
var optTag = document.createElement('option');
optTag.value = i;
optTag.className = "InserisciTemplateExtension";
optTag.innerHTML = val.string;
TagSelect.appendChild(optTag);
Riga 489 ⟶ 483:
// Récupération des information et requête de page
getLiveTagFunctions["InserisciTemplateExtension"] = function(page, option){
function myGetLiveTag(page){
var message = lstMyTemplate[TagSelectoption.value];
lrcDisplayDebug("Automatic function (Tag)");
wpajax.http({ url: wgServer + wgScriptPath + '/api.php?format=xml'
var TagSelect = document.getElementById("LiveTagReason");
var TagButton = document.getElementById("LiveTagLink");
if(!TagSelect || !TagButton) return;
var message = lstMyTemplate[TagSelect.value];
lrcDisableLink("LiveTagReason");
lrcDisableLink("LiveTagLink");
wpajax.http({ url: wgServer + wgScriptPath + '/api.php?format=xml'
+ '&action=query&prop=info&intoken=edit'
+ '&inprop=protection'
Riga 511 ⟶ 499:
function myPostTagPage(xmlreq, data){
var page = data.page;
var message = data.message;
ObjetXML = xmlreq.responseXML;
var Isprotected = false;
Riga 525 ⟶ 512:
return;
}
 
// show dialog
var tpl = showDialog(message, page);
var Page = ObjetXML.getElementsByTagName("page")[0];
edittoken = Page.getAttribute("edittoken");
}
Riga 612 ⟶ 595:
 
var edittoken = "";
function postTemplate (data, text, page){
lrcDisableLink("LiveTagReason");
{
lrcDisableLink("LiveTagLink");
var EditParam = new Array();
EditParam["token"] = edittoken;