MozillaZine

[EXT] Menu Wizard

Announce and Discuss the Latest Theme and Extension Releases.
pag77
 
Posts: 1298
Joined: December 26th, 2013, 10:46 pm

Post Posted September 8th, 2017, 9:23 am

Sorry... "OnPopupShowing" - from MainContextMenu?
the code to hide must be located in the parent menu-folder
If your menu is in MainContextMenu, then you must add your code to the "OnPopupShowing" for "MainContextMenu", before return gContextMenu.shouldDisplay; !!!

Ben Myers
 
Posts: 5
Joined: September 8th, 2017, 3:03 am

Post Posted September 8th, 2017, 1:09 pm

pag77 wrote:Sorry... "OnPopupShowing" - from MainContextMenu?
the code to hide must be located in the parent menu-folder
If your menu is in MainContextMenu, then you must add your code to the "OnPopupShowing" for "MainContextMenu", before return gContextMenu.shouldDisplay; !!!


OK, that seems to work, but erratically. Sometimes it shows up when it shouldn't and other times not showing when it should. Any ideas on this?

Ben

pag77
 
Posts: 1298
Joined: December 26th, 2013, 10:46 pm

Post Posted September 9th, 2017, 12:25 am

Please show all code from "OnPopupShowing" for "MainContextMenu"

Ben Myers
 
Posts: 5
Joined: September 8th, 2017, 3:03 am

Post Posted September 9th, 2017, 9:24 am

pag77 wrote:Please show all code from "OnPopupShowing" for "MainContextMenu"


var aNode=document.getElementById("context-searchselect").searchTerms;
var qrzcq=document.getElementById("s3mw_new_menu_1504775828967");
qrzcq.style.display = (aNode.length < 4 || aNode.length > 8 ) ? 'none' : '';

if (event.target != this) return true; gContextMenu = new nsContextMenu(this, event.shiftKey); if (gContextMenu.shouldDisplay) updateEditUIVisibility(); return gContextMenu.shouldDisplay;


Incidentally, it seems to work correctly on the second right-click. That is, if it comes up wrong on the first right-click, all I have to do is right-click again and it comes up correctly.

Ben

pag77
 
Posts: 1298
Joined: December 26th, 2013, 10:46 pm

Post Posted September 9th, 2017, 10:10 am

Ben Myers wrote:Incidentally, it seems to work correctly on the second right-click. That is, if it comes up wrong on the first right-click, all I have to do is right-click again and it comes up correctly.

try to delay the launch of the code:
Code: Select all
setTimeout(function(){
    var aNode=document.getElementById("context-searchselect").searchTerms;
    var qrzcq=document.getElementById("s3mw_new_menu_1504775828967");
    qrzcq.style.display = (aNode.length < 4 || aNode.length > 8 ) ? 'none' : '';
}, 100);

Ben Myers
 
Posts: 5
Joined: September 8th, 2017, 3:03 am

Post Posted September 9th, 2017, 11:20 am

pag77 wrote:
Ben Myers wrote:Incidentally, it seems to work correctly on the second right-click. That is, if it comes up wrong on the first right-click, all I have to do is right-click again and it comes up correctly.

try to delay the launch of the code:
Code: Select all
setTimeout(function(){
    var aNode=document.getElementById("context-searchselect").searchTerms;
    var qrzcq=document.getElementById("s3mw_new_menu_1504775828967");
    qrzcq.style.display = (aNode.length < 4 || aNode.length > 8 ) ? 'none' : '';
}, 100);


That did it. Thank you very much for your help.

Ben

Tanookirby
 
Posts: 16
Joined: September 5th, 2015, 8:35 pm

Post Posted Yesterday, 5:25 pm

So I heard that this extension will not be functional in version 57. Have you ever thought about making a request to have menu customization an official part of Firefox?

pag77
 
Posts: 1298
Joined: December 26th, 2013, 10:46 pm

Post Posted Yesterday, 10:11 pm

Unfortunately, WebExtensions (the new API for Firefox 57+) does not have the functionality for the correct operation of this addon in Firefox.
So this addon will no longer work with the release of Firefox 57 in November 2017!
This is the inevitable change in Firefox - all Xul-addons will die out in Firefox 57
https://blog.mozilla.org/addons/2017/02/16/the-road-to-firefox-57-compatibility-milestones/

But you can install Firefox 52 ESR and enjoy work until June 2018
https://www.mozilla.org/en-US/firefox/organizations/faq/

Tanookirby wrote:Have you ever thought about making a request to have menu customization an official part of Firefox?

No, and it seems to me that for Firefox it is feature not necessary

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 3 guests