FlightGear wiki:Instant-Refs: Difference between revisions

Jump to navigation Jump to search
Fix createOnlyRef()
(Fix createOnlyRef())
Line 778: Line 778:


function createOnlyRef(data) {
function createOnlyRef(data) {
  var date_added = new Date();
   var wikiText = '<ref>{{cite web\n' +
   var wikiText = data.content + '\n'+'<ref>{{cite web\n' +
   '|url    = ' + data.url + '\n' +
   ' |url    = ' + data.url + '\n' +
   '|title  = ' + nowiki(data.title) + '\n' +
   ' |title  = ' + nowiki(data.title) + '\n' +
   '|author = ' + nowiki(data.author) + '\n' +
   ' |author = ' + nowiki(data.author) + '\n' +
   '|date  = ' + datef(data.date) + '\n' +
   ' |date  = ' + datef(data.date) + '\n' +
   '}}</ref>';
   ' |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