Content deleted Content added
Writ Keeper (talk | contribs) m debug1 |
Writ Keeper (talk | contribs) m bugfix3 |
||
Line 46:
function talkbackSubmit(i)
{
var date = new Date();▼
submitForm = document.getElementById("TBSubmit" + i);
submitForm.innerHTML = '<input type="hidden" name="wpTextbox1" value="{{Wikipedia:Teahouse/Teahouse talkback|WP:Teahouse/Questions|ts='+'~~'+'~~'+'}}">\n<input type="hidden" name="wpSection" value="new">\n<input type="hidden" name="wpEditToken" value="' + mw.user.tokens.get( 'editToken' ) + '">\n<input type="hidden" name="wpStarttime" value="' +
▲ submitForm.innerHTML = '<input type="hidden" name="wpTextbox1" value="{{Wikipedia:Teahouse/Teahouse talkback|WP:Teahouse/Questions|ts='+'~~'+'~~'+'}}">\n<input type="hidden" name="wpSection" value="new">\n<input type="hidden" name="wpEditToken" value="' + mw.user.tokens.get( 'editToken' ) + '">\n<input type="hidden" name="wpStarttime" value="' + date.getYear() + (date.getMonth() + 1) + date.getDate() + date.getHours() + date.getMinutes() + date.getSeconds() + '">\n<input type="hidden" name="wpEdittime" value="' + date.getYear() + (date.getMonth() + 1) + date.getDate() + date.getHours() + date.getMinutes() + date.getSeconds() + '">\n<input type="hidden" name="wpSummary" value="Teahouse talkback: you\'ve got messages!">';
submitForm.submit();
}
Line 63 ⟶ 61:
oldNode.parentNode.appendChild(newNode);
}
}
function getMWTimestamp()
{
▲ var date = new Date();
var month = date.getUTCMonth() + 1;
var date = date.getUTCDate();
var hours = date.getUTCHours();
var minutes = date.getUTCMinutes();
var seconds = date.getUTCSeconds();
if(month.length != 2)
{
month = "0" + month;
}
if(date.length != 2)
{
date = "0" + date;
}
if(hours.length != 2)
{
hours = "0" + hours;
}
if(minutes.length != 2)
{
minutes = "0" + minutes;
}
if(seconds.length != 2)
{
seconds = "0" + seconds;
}
return "" + date.getUTCFullYear() + month + date + hours + minutes + seconds;
}
|