【已解决】Firefox Nightly103.0a1与脚本发生冲突,求修改!!!

阅读:1514回复:2
2022-06-22 11:00
写私信
楼主#
Firefox Nightly103.0a1与下俩一脚本发生冲突,书签里的地址打不开,请大佬@lonely_8 帮忙修改下!!!谢谢!!!
// 02. 历史记录在新标签打开
  
(function() {
  
if (!location.href.startsWith('chrome://browser/content/browser.x'))
    return;
  
  eval('PlacesUIUtils.openNodeWithEvent = '  + PlacesUIUtils.openNodeWithEvent.toString()
    .replace(' && PlacesUtils.nodeIsBookmark(aNode)', '')
    .replace('getBrowserWindow(window)', 
      '(window && window.document.documentElement.getAttribute("windowtype") == "navigator:browser") ? window : BrowserWindowTracker.getTopWindow()')
  );
  
  let onPopupshowing = function() {
    let historyMenu = document.getElementById('history-menu');
    if (!historyMenu._placesView) {
      new HistoryMenu(event);
      historyMenu._placesView._onCommand = function HM__onCommand(aEvent) {
        let placesNode = aEvent.target._placesNode;
        if (placesNode) {
          PlacesUIUtils.openNodeWithEvent(placesNode, aEvent);
        };
      };
    };
  };
  
  let historyPopup = document.getElementById('historyMenuPopup');
  historyPopup.setAttribute('onpopupshowing', '(' + onPopupshowing.toString() + ')()');
  
})();

最新喜欢:

taoy48...
2022-06-22 13:53
写私信
1楼#
PlacesUtils.nodeIsBookmark
改成
lazy.PlacesUtils.nodeIsBookmark
2022-06-23 12:45
写私信
2楼#
lonely_8:PlacesUtils.nodeIsBookmark
改成
lazy.PlacesUtils.nodeIsBookmark
回到原帖
谢谢大佬!问题已解决!