User talk:Mendel/monaco.js

$(document).ready(function{ $("#menuMyFollowing").attr('href','/wiki/Special:Watchlist'); $("#menuMyFollowing").html('my watchlist'); }); I tried to change the link in the dropdown menu, but apparently I'm either doing it wrong, or the code runs before the dropdown is generated. -- ◄mendel► 19:38, September 8, 2010 (UTC)

71.141.96.112 changed the above code to $(function{ $("#menuMyFollowing").attr('href','/wiki/Special:Watchlist'); $("#menuMyFollowing").html('my watchlist'); }); I tried this version, but it didn't work either. -- ◄mendel► 12:53, September 12, 2010 (UTC)


 * You were right the first time: the "MORE" drop-down menu is generated with an ajax script only when you click the button. So I hijacked it.

$("#headerButtonUser").unbind("click.headerMenu",openUserMenu); // Disable the original script

function openUserMenuCustom(event) { event.stopPropagation; if($('#headerMenuUser').exists) { $("#headerMenuUser").makeHeaderMenu("headerButtonUser",openUserMenu,{attach_to:"#userData",attach_at:"bottom"}); } else { var html = '' +'   ' +'       My page' +'       My watchlist' +'       My contributions' +'       Manage widgets</li>' +'       <a accesskey="" title="Your preferences" href="/wiki/Special:Preferences" id="menuPreferences">Preferences</a></li>' +'   </ul>' +' ';   $("#positioned_elements").append(html); $("#headerMenuUser").makeHeaderMenu("headerButtonUser",openUserMenu,{attach_to:"#userData",attach_at:"bottom"}); $('#cockpit1').click(WidgetFramework.show_cockpit); $("#headerMenuUser").click(function(e){if(e.target.nodeName=="A"){$.tracker.byStr('userMenu/'+$(e.target).attr('id'));};}); } } $("#headerButtonUser").bind("click.headerMenu",openUserMenuCustom);
 * With this, you can even add/remove li's from the ul to completely customize your usermenu. Bot ishmael 14:42, September 12, 2010 (UTC)
 * I knew Ishy was a bot --  Random <font color="Orange">Time  14:43, September 12, 2010 (UTC)


 * I use the bot for testing JS stuffs so I don't clutter RC. I also use it for testing Monaco stuffs (I'm a die-hard Monobook fan).  &mdash;Dr Ishmael Diablo_the_chicken.gif 14:46, September 12, 2010 (UTC)