MediaWiki:Vector.js: Difference between revisions

m
Repairing javascript glitch. Will take a few minutes for the changes to apply.
m (oh, two divs. in two different sections.)
m (Repairing javascript glitch. Will take a few minutes for the changes to apply.)
Line 83: Line 83:
  // create div and set innerHTML to link
  // create div and set innerHTML to link
  var divContainer = document.createElement("div");
  var divContainer = document.createElement("div");
  divContainer.innerHTML = '<div class="editsection" style="font-size: 80%">[<a href="/w/index.php?title='+pageTitle+'&action=edit&section=0" title="Edit first section: '+pageTitle+'">edit top of page</a>]</div>';
  divContainer.innerHTML = '<div class="editsection" style="font-size: 80%">[<a href="/w/index.php?title='+escape(pageTitle)+'&action=edit&section=0" title="Edit first section: '+pageTitle+'">edit top of page</a>]</div>';


  // insert divContainer into the DOM below the h1
  // insert divContainer into the DOM below the h1
Line 118: Line 118:
  // create div and set innerHTML to link
  // create div and set innerHTML to link
  var divContainer = document.createElement("div");
  var divContainer = document.createElement("div");
  divContainer.innerHTML = '<div class="editsection" style="font-size: 80%">[<a href="/w/index.php?title='+pageTitle+'&action=edit&section=new" title="Start new section: '+pageTitle+'">+</a>]</div>';
  divContainer.innerHTML = '<div class="editsection" style="font-size: 80%">[<a href="/w/index.php?title='+escape(pageTitle)+'&action=edit&section=new" title="Start new section: '+pageTitle+'">+</a>]</div>';


  // insert divContainer into the DOM below the h1
  // insert divContainer into the DOM below the h1