FlightGear wiki:Instant-Refs: Difference between revisions

Jump to navigation Jump to search
m
Maybe poorly-named, but intended to what it does: Undo revision 97613 by Red Leader (talk)
(Fix createOnlyRef())
m (Maybe poorly-named, but intended to what it does: Undo revision 97613 by Red Leader (talk))
Line 778: Line 778:


function createOnlyRef(data) {
function createOnlyRef(data) {
   var wikiText = '<ref>{{cite web\n' +
  var date_added = new Date();
   '|url    = ' + data.url + '\n' +
   var wikiText = data.content + '\n'+'<ref>{{cite web\n' +
   '|title  = ' + nowiki(data.title) + '\n' +
   ' |url    = ' + data.url + '\n' +
   '|author = ' + nowiki(data.author) + '\n' +
   ' |title  = ' + nowiki(data.title) + '\n' +
   '|date  = ' + datef(data.date) + '\n' +
   ' |author = ' + nowiki(data.author) + '\n' +
   '}}</ref>';
   ' |date  = ' + datef(data.date) + '\n' +
   ' |added  = ' + datef(date_added.toDateString()) + '\n' +
  '  |script_version = ' + GM_info.script.version + '\n' +
  '  }}</ref>\n';
   return wikiText;
   return wikiText;
}
}


// Output the text.
// Output the text.

Navigation menu