mousi
05-07-2006, 10:00 PM
What is this hack?
Have you ever noticed that when there are links in the popup menus that use javascript, you must click on the text for the link to work? For example try "Quick Links->Open Buddy List" in this forum. If you just click on the td area and not on the text, the popup window doesn't show up.
You can fix this with this hack!
Modification:
1)Open ./clientscript/vbulletin_menu.js
2)Find:
tds[i].onclick = vB_Popup_Events.prototype.menuoption_onclick_link;
3)Replace it with:
var alphas = fetch_tags(tds[i], 'a');
if (alphas[0].onclick) {
tds[i].onclick = alphas[0].onclick;
} else {
tds[i].onclick = vB_Popup_Events.prototype.menuoption_onclick_link;
}
That's it. Now if you have a link like the following in a popup, it will work if you click on the entire td area:
<td class="vbmenu_option"><a href="#" onclick="doSomething();">Something</a></td>
This is my first hack. It's not something big, but I think it's usefull. If you like it please click Install (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=115025).
Have you ever noticed that when there are links in the popup menus that use javascript, you must click on the text for the link to work? For example try "Quick Links->Open Buddy List" in this forum. If you just click on the td area and not on the text, the popup window doesn't show up.
You can fix this with this hack!
Modification:
1)Open ./clientscript/vbulletin_menu.js
2)Find:
tds[i].onclick = vB_Popup_Events.prototype.menuoption_onclick_link;
3)Replace it with:
var alphas = fetch_tags(tds[i], 'a');
if (alphas[0].onclick) {
tds[i].onclick = alphas[0].onclick;
} else {
tds[i].onclick = vB_Popup_Events.prototype.menuoption_onclick_link;
}
That's it. Now if you have a link like the following in a popup, it will work if you click on the entire td area:
<td class="vbmenu_option"><a href="#" onclick="doSomething();">Something</a></td>
This is my first hack. It's not something big, but I think it's usefull. If you like it please click Install (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=115025).