// ==UserScript== // @name Vikatan Easy Navigate // @namespace http://saravan.blogspot.com // @description Easier Navigation for vikatan sites // @include http://www.vikatan.com/* // ==/UserScript== /********************************************************************* * Vikatan Easy Navigate - Easier Navigation for vikatan sites * Copyright (C) 2008, Saravana Kumar * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA *********************************************************************/ function trim (str) { return str.replace(/^\s+/, '').replace(/\s+$/, ''); } function getLocation(action) { if(!action) return; var first = action.indexOf("'"); var last = action.indexOf("'", first+1); if(first == -1 || last == -1) return action; return action.substring(first+1, last); } function checkForHash(href) { if(!href || href.indexOf('#')==0) return; else return href; } function getMainMenuObject(mouseover) { if(!mouseover) return; mouseover = mouseover.replace('window.', ''); var menuStart = mouseover.indexOf('(')+1; if(menuStart==0) return; var menuEnd = mouseover.indexOf(',', menuStart); if(menuEnd==-1) return; var menuObjName = trim(mouseover.substring(menuStart, menuEnd)); try { return eval('unsafeWindow.' + menuObjName); } catch(ex) { GM_log('Exception for ' + menuObjName + ' - ' + ex); return ; } } function btnDeselectAll_Click() { var selectedLinks = document.evaluate("//input[contains(@id, '__gmChk')]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); if(selectedLinks.snapshotLength==0) { return; } for(var i=0; i"); for(var j=0; j0) { var rightCol = rightColResult.snapshotItem(0); rightCol.insertBefore(menuDiv, rightCol.firstChild); //rightCol.appendChild(menuDiv); var contentTDResults = document.evaluate("//td[@width='779']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); if(contentTDResults.snapshotLength>0) { contentTDResults.snapshotItem(0).setAttribute("valign", "top"); } } else { document.body.appendChild(menuDiv); } } catch(err) { document.body.appendChild(menuDiv); } GM_addStyle('.__gmMenu { background-color: #fff; color: #000000; font-family: Vikatan_TAM, Latha,Arial Unicode MS,"trebuchet ms",sans-serif; padding-bottom: 10px;} .__gmMenu h2 { font-size: small; text-align: left; font-weight: bold; margin-top: 10px; margin-bottom: 5px; } .__gmMenu ul { padding-left: 0px; margin: 0px; margin-bottom: 0px; } .__gmMenu li { margin-top:5px; margin-left: 20px; font-size: small; text-align: left; list-style-type: none; } .__gmMenu a:link, a:visited, a:active { color: #006666; text-decoration: none; } .__gmMenu a:hover { color: #999999; text-decoration: underline;}'); } function removeMarquee() { var allMarq = document.getElementsByTagName("marquee"); for(var i= allMarq.length-1;i>=0;i--) { allMarq[i].parentNode.removeChild(allMarq[i]); } } findAndAddMenuItems(); //removeMarquee();