10-25-2017 10:08 PM
This is brute force, and has problems, but seems to at least do something here in Firefox 3.6.24 and Firefox 31.
There are browser security issues that may cause it to not work in newer Firefox versions (it was fine in FF3.6.24 but I had to change a FF internal preference to get it to quit throwing errors in the console even though it worked fine). Have no idea if it will work in Chrome or IE, or Edge, and even if it does anything usefule for anyone else.
Basically all it does is create an empty iframe below the "See Full Item Description" button, goes and grabs the hidden description URL from the button code, opens that in the iframe, and hides the button.
A big problem is the size of the iframe (this stuff is not my strong suit). No matter what I tried, the iframe was always only 150px high (and therefore cut off and lost any lines below that unless I turned scrollbars on for the iframe. Problem with that is that it's annoying, and the stuff got cut off again anyway when printing.
Solution is to make the iframe bigger, but problem is that I'm 99% sure there is no way to size it to just fit the content because there are cross domain browser security issues and no programatic access is permitted to the content (thank eBay for that - content from ebaydesc.com displayed on an ebay.com page is a crossdomain problem)
Anywho, I chose 500 pixels height as a default, and if a problem can be edited in the beginning code of the bookmarklet to be more or less. It's a tradeoff - too small and big description is cut off, too tall and a ton of whitespace at the end. Still it provides a quick way to get printout. (probably going to look at the sizing issue again, but as I said, 99% sure it's hopeless to be able to tailor the iframe to the description content heightwise.)
As with other bookmarklets here, remove* the X in javaXscript in the code below before saving it in the location field of a new bookmark on the toolbar, name it something like ViewDescr, and then click the bookmarklet when on an item page that shows the happy fun time "See Full Item Description" button. To get back to the button showing, refresh the page.
(*Lithium forum bug that messes it up otherwise)
javaXscript:(function(){if(location.href.substring(0,25)=='https://www.ebay.com/itm/')
{var%20newDFrame=document.createElement('iframe');newDFrame.setAttribute("id","newDFrame");
var%20viewDButton=document.getElementById('snippetdesc');var%20buttParent=viewDButton.parentNode;
if(buttParent.tagName=='SPAN')buttParent=buttParent.parentNode;if(buttParent.tagName!='DIV')return;
buttParent.parentNode.appendChild(newDFrame);buttParent.setAttribute('style','display:none');
newDFrame.setAttribute("src",viewDButton.href.replace(/http:\/\//i,"https://"));
newDFrame.setAttribute("width","100%");newDFrame.setAttribute("scrolling","no");
newDFrame.setAttribute("height","500");}})();
To change the height of the iframe change the value of the height attribute at the end above from 500 to whatever suits your needs (more is probably better than less - extra whitespace is better than missing text). Can also turn scrollbars on in the iframe by changing 'scrolling' attribute value from no to yes.
The href.replace in the 3rd line from the bottom above changes the http call to description content eBay provides to https to keep Firefox from throwing a mixed content fit.
Coded this as a GreaseMonkey script that automatically performs the function when the page loads, but mostly because of the iframe height problems where content might get hidden, think the manual bookmarklet approach is better for now. And is more universal and easier to implement.
Curious to see if it works for anyone else, does anything useful, and if anyone has any ideas for changes or additional features (other than the iframe height thing 🙂
11-09-2017 08:32 AM
Bumping this since I find it so useful for both diagnosing here in the forums, and as a buyer, and in light of the recent explosion of listings that still have problems hidden behind "View Full Description" buttons (due to http/https issues mostly and I'm seeing a lot of them).
Still haven't found time to address the frame sizing issue, so in the interim am personally using it with a fixed 800px high frame and scrolling on - works ok as a middle of the road compromise for most descriptions. The code in the box below is unchanged from the original above except for those 2 changes.
In addition to being useful for printing purchase listings for archival purposes, and just a simple way to get a look at hidden description text on same page, I want to point out is that this works great in conjunction with the inbuilt Firefox frame viewing functions, especially for getting a quick look at the iframe source to diagnose non-secure link issues without opening web developer, Firebug, etc.
Use the bookmarklet to get the description content to appear, right click in that description area, and choose "View Frame Source" - a source window opens which can easily be searched for HTTP, etc (especially if the Firefox "Search for text when I start typing" advanced option is enabled).
Also a quick way to get a look at how many levels of [font rwr...] tags ebay has added and nested (see other threads about that evil issue.)
javaXscript:(function(){if(location.href.substring(0,25)=='https://www.ebay.com/itm/') {var%20newDFrame=document.createElement('iframe');newDFrame.setAttribute("id","newDFrame"); var%20viewDButton=document.getElementById('snippetdesc');var%20buttParent=viewDButton.parentNode; if(buttParent.tagName=='SPAN')buttParent=buttParent.parentNode;if(buttParent.tagName!='DIV')return; buttParent.parentNode.appendChild(newDFrame);buttParent.setAttribute('style','display:none'); newDFrame.setAttribute("src",viewDButton.href.replace(/http:\/\//i,"https://")); newDFrame.setAttribute("width","100%");newDFrame.setAttribute("scrolling","yes"); newDFrame.setAttribute("height","800");}})();