Archive for July 4th, 2010

As a result of recent changes in Xmarks you may experience some problems if you're also a NoScript user.

Xmark's login dialog and setup wizard ask you to "Allow JavaScript on login.xmarks.com", or directly come out broken as HTML source. You cannot exit the dialog (the browser seems stalled), and even if you manage to, you discover that allowing login.xmarks.com or even the whole xmarks.com does not help.

The solution

  1. Use the "Esc" key to exit the dialog
  2. Click the NoScript icon and look in the "Recently blocked sites" submenu.
  3. Select Allow googleapis.com, Allow xmarks.com or both (whathever you find there).

Alternatively, you can open NoScript Options|Whitelist and manually allow xmarks.com and googleapis.com. Looks like the Xmarks folks overlooked the need of allowing the latter.

Extensions developers!

More in general, extensions developers who need some web site to be allowed in NoScript for their extension to work, may want to use some code like this:

if ("@maone.net/noscript-service;1" in Components.classes) {
  let ns =  Components.classes["@maone.net/noscript-service;1"]
    .getService().wrappedJSObject;
 
  let myWhitelist = ["xmarks.com", "googleapis.com"]
    .filter(function(s) {
      return !ns.isJSEnabled(s);
    });
 
  if (myWhitelist.length > 0) {
    let prompt = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
      .getService(Components.interfaces.nsIPromptService);
    if (prompt.confirm(null, "Xmarks Permission Request",
       "Xmarks needs to add\n" + myWhitelist.join(" and ") +
       "\nto your NoScript whitelist.\nProceed?")) {
       ns.setJSEnabled(myWhitelist, true);
    }
  }
}

Bad Behavior has blocked 1554 access attempts in the last 7 days.