Forum:Sharing menu code update

Hi, I need to update two codes that customize the sharing menu, since they recently stop working correctly although they weren't changed. The first one add a Google plus button in the sharing menu. It's working, but now the button is displayed also when the menu is closed, as you can see on any page on this wiki (top left).

The second one, should leave the menu "opened" as default, but it's not working.


 * There's a bunch of upcoming changes to the share toolbar to make it lazy-load only after it is actually opened, I don't know if any of that is live already though. If you really want to force the share menu open, you can try:


 * For the plus one button, I can't see it at all as it's just showing up as an empty DIV so I don't know what's wrong with that one.


 * On a tangentially related topic, your DisplayClock configuration seems slightly strange, you may want:


 * so that the seconds will stop disappearing. Lunarity 07:03, November 12, 2012 (UTC)


 * Thanks, maybe I'll try to ask the staff for the Google plus issue.


 * The code to leave the menu open, doesn't work.


 * Weird. It works if I run it and do  in the console. Try this one:


 * Lunarity 01:21, November 13, 2012 (UTC)


 * Nope, still not working...

(Reset indent) I suspect the problem is fighting with Wikia's code, their code probably undoes everything when it starts. Last chance that it's just an event glitch: If this doesn't work either, then things will have to get uglier. Lunarity 14:14, November 13, 2012 (UTC)


 * :( still no...


 * On a hunch I looked at Common.js instead, and there's this:

 /*Tab-container in pagine */ require_once("$IP/extensions/JQueryTabs/JQueryTabs.php");
 * That's PHP, not JavaScript. The reason none of this is working is because ResourceLoader glues Wikia.js onto the end of Common.js and everything after the line doesn't run since that line is garbage and crashes the script. If you remove that, one of these codes should have worked. Lunarity 09:57, November 14, 2012 (UTC)


 * It's half-working, the share button is "active" but the menu itself is not displayed, I tried all the codes posted above. You can see it on an example page.


 * That's because the toolbar was made to lazy load in today's technical update.  now no longer exists. It is only created when the share button is opened. Working around that is going to be a problem since determining when the button is 'armed' and prepared to start the lazy load is difficult to do reliably. The blunt way to do it is this:


 * Lunarity 17:34, November 14, 2012 (UTC)


 * Finally, it works! Thank you. Now I have to figure out a solution for my first problem... guess I'll ask the staff.