Changeset 744

Show
Ignore:
Timestamp:
06/09/08 08:50:19 (6 months ago)
Author:
oyasu..@gmail.com
Message:

Fixes #111 (small variation on a patch provided by ticket poster).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/chrome/chromeFiles/content/browser.js

    r724 r744  
    471471  // remove all the scripts from the list 
    472472  for (var i = popup.childNodes.length - 1; i >= 0; i--) { 
    473     if (popup.childNodes[i].script) { 
    474       popup.removeChild(popup.childNodes[i]); 
     473    var node = popup.childNodes[i]; 
     474    if (node.script || node.getAttribute("value") == "hack") { 
     475      popup.removeChild(node); 
    475476    } 
    476477  } 
     
    495496  if (runsFramed.length) { 
    496497    runsFramed.forEach(appendScriptToPopup); 
    497     var separator = document.createElement("menuseparator"); 
    498     separator.setAttribute("value", "hack"); // to get removed in the loop above 
    499     popup.insertBefore(separator, tail); 
     498    if (runsOnTop.length) { // only add the separator if there is stuff below 
     499      var separator = document.createElement("menuseparator"); 
     500      separator.setAttribute("value", "hack"); // remove it in the loop above 
     501      popup.insertBefore(separator, tail); 
     502    } 
    500503  } 
    501504  runsOnTop.forEach(appendScriptToPopup);