Jump to content

User:Ch1902/vector.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ch1902 (talk | contribs) at 16:07, 20 November 2009 (new). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/* disable */
ls_enable = false;

function addCustomLink (href, title)
{
   var ca = document.getElementById('p-cactions');
   var ul = ca.getElementsByTagName('UL')[0];

   var li = document.createElement('LI');
   var lk = document.createElement('A');
       lk.setAttribute('href', href);

   lk.appendChild(document.createTextNode(title));
   li.appendChild(lk);

   ul.appendChild(li);

   return;
}

addOnloadHook(function () {
   addCustomLink('http://commons.wikimedia.org/wiki/User:Ch1902', 'COM:Ch1902');
   addCustomLink('http://commons.wikimedia.org/wiki/Special:Watchlist', 'COM:Watch');
   addCustomLink('http://commons.wikimedia.org/w/index.php?title=Special:Upload&uploadformstyle=basic', 'COM:Upload');
});