MozillaZine

SeaMonkey and Ghostery

User Help for Seamonkey and Mozilla Suite
Philip Chee

User avatar
 
Posts: 6475
Joined: March 1st, 2005, 3:03 pm

Post Posted October 3rd, 2014, 9:19 am

Lemon Juice wrote:There are a few other things that need to be changed in Ghostery to enable full SM support - there are two Fx-specific chrome:// urls which need to be changed to their SM counterparts
Hi! Can you let me know which ones? I'll let the Ghostery developers know. So far I've found one in:
background.js
Code: Select all
   for (i = 0; i < windows.length; i++) {
      window = windows[i];
      if ('chrome://browser/content/browser.xul' != window.location) { continue; }
      var activeTab = SDK.tabsLib.getTabForWindow(window.content).id;
      Ghostery.activeTabs.push(activeTab);
   }
button.js and menu.js are OK because they detect the application.
button.js:
Code: Select all
var browserURL = "chrome://browser/content/browser.xul";
if (require('sdk/system/xul-app').name == 'SeaMonkey') {
   browserURL = "chrome://navigator/content/navigator.xul";
}
menu.js:
Code: Select all
if (require('sdk/system/xul-app').name == 'SeaMonkey') {
   browserURL = "chrome://navigator/content/navigator.xul";
   menuAnchor = 'taskPopup';
}

Phil

Lemon Juice
 
Posts: 784
Joined: June 1st, 2006, 9:41 am

Post Posted October 3rd, 2014, 12:15 pm

Yes, I think you got them all, I didn't really look at them closely enough to know which ones need to be changed. So background.js seems to be the only crucial one because it registers some important functionality on active tabs.
*** SeaMonkey — weird name, sane interface, modern bowels ***
Mouse Gestures for SeaMonkey/Firefox
Convert Fx and TB extensions to SeaMonkey

Lemon Juice
 
Posts: 784
Joined: June 1st, 2006, 9:41 am

Post Posted October 13th, 2014, 12:41 pm

I tested a few sdk addons and I managed to get 2 out of 7 to work in SeaMonkey by removing application checks in omni.ja. Not a fantastic result but still better than nothing:

1. QrCodeR - success! Requires patch in context-menu.js, selection.js and panel.js.
2. Awesome Screenshot Plus - success! Console says "TypeError: window.dcm_api is undefined" but works fine. Requires patch in panel.js.
3. Lightbeam for Firefox - fail. Apparently requires patching panel.js and widget.js. Toolbar button is invisible and non-functional.
4. QR Code Image Generator - fail. Apparently requires patching panel.js and widget.js. Toolbar button is invisible and non-functional.
5. Self-Destructing Cookies - fail. Apparently requires patching panel.js and widget.js. Toolbar button is invisible and non-functional.
6. easy Xdebug (with moveable icon) - fail. Apparently requires patching ui/button/action.js and ui/button/view.js. "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIXPCComponents_Utils.import]".
7. YouTube Unblocker - fail. Apparently requires patching ui/button/action.js and ui/button/view.js. "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIXPCComponents_Utils.import]".

Based on this I think we could now create a bug to patch context-menu.js, selection.js and panel.js for QrCodeR and Awesome Screenshot Plus. Is that okay or do you have anything to add here?

It's a shame that for many sdk extensions a simple thing like creating a toolbar button is problematic in SM but I suppose this is because of quite big differences in UI.
*** SeaMonkey — weird name, sane interface, modern bowels ***
Mouse Gestures for SeaMonkey/Firefox
Convert Fx and TB extensions to SeaMonkey

Anonymosity
 
Posts: 8571
Joined: May 7th, 2007, 12:07 pm

Post Posted October 14th, 2014, 1:22 pm

I am wondering if Privacy Badger actually does anything in SeaMonkey. It is supposed to block tracking. The only visible response I got after getting it to install was to show me some preference settings, but the toolbar button that is supposed to appear does not. That is for changing the default actions, and the defaults were fine, but it at least shows some visible object in Firefox, but not in SeaMonkey.

Philip Chee

User avatar
 
Posts: 6475
Joined: March 1st, 2005, 3:03 pm

Post Posted October 20th, 2014, 2:09 pm

Lemon Juice wrote:Toolbar button is invisible and non-functional.
The SDK code has a hard dependency on a Firefox module CustomizableUI.jsm. I had a look at this( to see if I could build a minimal shim for SeaMonkey) and calling it bloated is an understatement.
Lemon Juice wrote:"Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIXPCComponents_Utils.import]".
I expect the SDK is trying to import some Firefox specific module probably CustomizableUI .
Lemon Juice wrote:Based on this I think we could now create a bug to patch context-menu.js, selection.js and panel.js for QrCodeR and Awesome Screenshot Plus. Is that okay or do you have anything to add here?
Looks good to me, nothing to add.
Lemon Juice wrote:It's a shame that for many sdk extensions a simple thing like creating a toolbar button is problematic in SM but I suppose this is because of quite big differences in UI.
I would say that the differences in UI aren't that great from a toolbar button perspective. The major problem is that the SDK calls in to CustomizableUI.jsm which only exists in Firefox. The Ghostery toolbar button works because they rolled their own button code instead of using the SDK API.

Phil

patrickjdempsey

User avatar
 
Posts: 23734
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC

Post Posted October 20th, 2014, 2:23 pm

So glad they finally "simplified" Firefox customization and adding addons buttons:
https://developer.mozilla.org/en-US/doc ... ableUI.jsm

The simplified documentation for this is longer than the entire old customize.js file. ](*,)
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/

Lemon Juice
 
Posts: 784
Joined: June 1st, 2006, 9:41 am

Post Posted October 28th, 2014, 1:53 pm

Here is the bug report:

Update context-menu.js, selection.js & panel.js metadata to work in SeaMonkey

Have a look if this looks fine!

Philip Chee wrote:
Lemon Juice wrote:Toolbar button is invisible and non-functional.
The SDK code has a hard dependency on a Firefox module CustomizableUI.jsm. I had a look at this( to see if I could build a minimal shim for SeaMonkey) and calling it bloated is an understatement.


It's a pity... I was hoping that at least some small shim could be made easily only to support adding toolbar buttons since that appears to be one of the most common things that extensions do. What I imagine would be to port all CustomizableUI to SM in such a way that for most stuff there would only be stub methods and properties (since obviously it would be hard to adapt Australis stuff) and only the code for creating buttons would be adjusted to work with SM. But I haven't looked at the source code so I may indeed not realize how monstrous that task could be :shock: :!:
*** SeaMonkey — weird name, sane interface, modern bowels ***
Mouse Gestures for SeaMonkey/Firefox
Convert Fx and TB extensions to SeaMonkey

Philip Chee

User avatar
 
Posts: 6475
Joined: March 1st, 2005, 3:03 pm

Post Posted October 31st, 2014, 8:58 am

Searching through the Addon-SDK: It looks like the addon-SDK only calls a limited number of functions in CustomizableUI mostly:
Code: Select all
createWidget()
destroyWidget()
getPlacementOfWidget()
addListener(buttonListener)
removeListener(buttonListener)

Looking at say \sdk\ui\button\view.js (I think they are using some sort of Model–view–controller paradigm)
Code: Select all
function getNode(id, window) {
  return !views.has(id) || ignoreWindow(window)
    ? null
    : CustomizableUI.getWidget(id).forWindow(window).node
};

function isInToolbar(id) {
  let placement = CustomizableUI.getPlacementOfWidget(id);

  return placement && CustomizableUI.getAreaType(placement.area) === 'toolbar';
}
I think it would be easy to create a seamonkey-view.js that implements getNode(), isInToolbar(), create(), dispose() without calling CustomizableUI.js

Zerebralus
 
Posts: 100
Joined: September 3rd, 2014, 7:20 am

Post Posted December 16th, 2014, 7:42 am

I thought Seamonkey 2.32 should fixed the Ghostery problem. SO which version I might use then?? just tried the Seamonkey 2.32 beta 1(Candidates on ftp) but the Ghostery (5.2.1) doesn't appear in the taskbar.


EDIT: Just ran the actual 5.4.1 Version through the Converter and it works.

Lemon Juice
 
Posts: 784
Joined: June 1st, 2006, 9:41 am

Post Posted December 19th, 2014, 8:17 am

Zerebralus wrote:EDIT: Just ran the actual 5.4.1 Version through the Converter and it works.

That's great, SM is getting better :)

Philip, do you know in which version changes from the Add support for SeaMonkey bug will appear? The bug says "Commits pushed to master..." but no indication which SM version is the target.
*** SeaMonkey — weird name, sane interface, modern bowels ***
Mouse Gestures for SeaMonkey/Firefox
Convert Fx and TB extensions to SeaMonkey

Philip Chee

User avatar
 
Posts: 6475
Joined: March 1st, 2005, 3:03 pm

Post Posted December 28th, 2014, 1:51 pm

Bug 1083327: Uplift Add-on SDK
Target Milestone: Mozilla36
This corresponds to SeaMonkey 2.33

Phil

Return to SeaMonkey Support


Who is online

Users browsing this forum: No registered users and 1 guest