diff --git a/theme/mymobile/javascript/custom.js b/theme/mymobile/javascript/custom.js index 135e99cadabef..b7c9a7697d1f1 100644 --- a/theme/mymobile/javascript/custom.js +++ b/theme/mymobile/javascript/custom.js @@ -127,10 +127,14 @@ $(document).ready(function() { //forum discussion page only stuff $('div#page-mod-forum-discussPAGE, #page-mod-forum-discuss div.generalpage, div.forumtype-single, .forumtype-single div.generalpage, div#page-mod-forum-postPAGE').live('pagebeforecreate',function(event, ui){ - //remove parent post because of hash remove this if has listening is fixed + // Handle the '#' in the URLs. $('.options div.commands a').each(function(index) { var url = $(this).attr("href"); - if (url.indexOf("#") != -1) { + if (url.indexOf("post.php") != -1 && url.indexOf("reply=") != -1) { + // Remove the anchor from the reply link. + $(this).attr('href', url.replace('#mform1', '')); + } else if (url.indexOf("#") != -1) { + // Remove "Show parent" and other links which contains a '#'. $(this).remove(); } });