cancel
Showing results for 
Search instead for 
Did you mean: 
This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
New member
1 0 0 0
Message 1 of 1
3,002
Flag Post
HP Recommended

HP Smart Web Printing breaks Adblock Plus in Firefox (accessing document too early)

I got a report that HP Smart Web Printing breaks Adblock Plus extension in Firefox. I checked the extension, the file toolbar.js in chrome/smartwebprinting.jar seems to cause the issue:

 

// Code at global scope
addEventListener("load", hpInitToolbar, false);

var printcmd = document.getElementById("cmd_print");
if(printcmd)
{
  printcmd.setAttribute("oncommand","NormalPrint();");
}

var printpreviewcmd = document.getElementById("cmd_printPreview");
if(printpreviewcmd)
{
  printpreviewcmd.setAttribute("oncommand","NormalPreview();");
}

 

This registers a listener for the "load" event - but some actions are carried out immediately, without waiting for the event to happen. Accessing browser's document before it is loaded breaks Adblock Plus and probably causes the issues reported in http://h30434.www3.hp.com/t5/Mobile-and-Web-printing/HP-SWP-and-Firefox-3-5-6-don-t-agree/td-p/19346... as well. Moving the code after addEventListener() call into hpInitToolbar function should fix the issue.

 

Unfortunately, I don't see any way to report this bug other than creating a topic here.

0 Kudos
This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation