MediaWiki:Common.js: Difference between revisions

m
Fixing "edit top of page" for some exceptional cases
mNo edit summary
m (Fixing "edit top of page" for some exceptional cases)
Line 331: Line 331:
  // 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">[<a href="/w/index.php?title='+encodeURI(pageTitle)+'&action=edit&section=0" title="Edit first section: '+pageTitle+'">edit top of page</a>]</div>';
  divContainer.innerHTML = '<div class="editsection">[<a href="/w/index.php?title='+encodeURIComponent(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 366: Line 366:
  // 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="editsectionnew">[<a href="/w/index.php?title='+encodeURI(pageTitle)+'&action=edit&section=new" title="Start new section: '+pageTitle+'">+</a>]</div>';
  divContainer.innerHTML = '<div class="editsectionnew">[<a href="/w/index.php?title='+encodeURIComponent(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