// ==UserScript== // @name KumudamEasyNavigate // @namespace http://saravan.blogspot.com // @description Adds easier Navigation for Kumudam Magazine websites // @include http://www.kumudam.com/* // ==/UserScript== /**************************************************************************** * KumudamEasyNavigate - Adds easier Navigation for Kumudam Magazine websites * 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 prevIssuesTable = prevIssuesTableResult.snapshotItem(0); prevIssuesTable.parentNode.appendChild(menuDiv); } else { document.body.appendChild(menuDiv); } GM_addStyle('.__gmMainContent { float: left; } .__gmMenu { float: right; 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: x-small; text-align: left; list-style-type: none; } .__gmMenu a:link, a:visited, a:active { color: #346784; } .__gmMenu a:hover { color: #999999; }'); } findAndAddMenuItems();