Archived Comments (locked)
|
|
The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008) |
|
|
Great script Lior,
And thanks again for writing this script :) |
|
|
Wonderful. I can scroll again! Thanks I think Haaretz's website is a very good example of very bad programming. Nothing to be done about it. I hope Lior will put a fix to this issue into the next version of the scripts. |
|
|
@dirkhaim - you're right again. The problem is not a frame but a wrapping "div" element around the entire content, which for him the overflow property is set to "scroll", while the overflow property of the <body> and <html> is set to "hidden" (that's an outstanding example for poor programming). I've managed to fix it by re-constructing the DOM tree and altering the script as follows.
// fix scrolling
contentDiv=$("content");
for(i=contentDiv.childNodes.length-1;i>=0;i--) {
insertAfter(contentDiv.childNodes[i], contentDiv);
removeNode(contentDiv.childNodes[i]);
}
removeNode(contentDiv);
document.body.style.overflow="auto";
document.body.style.textAlign="-moz-center";
htmlElement=document.getElementsByTagName("HTML");
htmlElement[0].style.overflow="auto";
Now that's supposed to solve your problem. It might make the page load slower than usual, but a good side-effect of this fix is that it makes the "Open articles inside this page (Haaretz Enhancer feature)" checkbox visible again. Not sure whether that's the best solution - perhaps other people will have better ideas.</html></body> |
|
|
Thanks. That does the trick. Now I am left with one issue in Haaretz's website. When the website loads and I want to page down with a 'space', it seems like the page is made out of a few frames with the content being in one of them. This causes a pagedown but not in the content. You can try to get to this situation by loading the website and after it loads, just press the space-bar. This one is really annoying. I would love to see the script fixes this problem, if it's possible. |
|
|
@dirkhaim:
//## Stop auto-refresh of the page.
// Taken and modified from Pirateshark's http://userscripts.org/scripts/show/3587
// who in turn took it from http://dunck.us/collab/DisableAutoRefresh
allElements = $x("//meta[@http-equiv='Refresh']|//meta[@http-equiv='refresh']|//meta[@http-equiv='REFRESH']");
allElements.forEach (function(e){
var content = e.getAttribute("content");
var stopTimer = window.setTimeout("window.stop();",(content-1)*1000); // in case load hasn't finished when the refresh fires
window.addEventListener("load", function(){ try { window.clearTimeout(stopTimer); } catch(ex) {} window.stop(); }, true);
});
And moving it above the following lines: //feature is active only inside main page + printed list articles.
if ( (isSectionPage || isMainPage) || (isCaptainMain || isCaptainSection) ){
For me, at least, it works well and doesn't cause any other bugs - but since I'm not familiar with the entire script as well as Lior I won't upload a "fixed" script and wait for him to do it. If anything get mixed up you can always restore changes by re-installing the script from this page. |
|
|
benleevolk, any chance you can put a link to the modified version or maybe paste the diff here? Thanks |
|
|
Hi Lior,
Thanks for the wonderful script! :) |
|
|
Thank you Lior, I have converted many people to greaseMonkey by showing them before and after versions of the Haaretz site. Your script makes that site so much better. A real killer app for Hebrew readers. |
|
|
To eliminate the frame obscuring the first talk-backs, just add www.chart.co.il to adblock as a filter.
|
|
|
Zaphod: Excellent, thank you. I coded the script so that quick solutions like yours are easy to create, and I'm glad it works. I'll incorporate your change. |
|
|
I've added these lines to the main block (let's say, after the end of "if (isPrintArticleList) {" block).
This solves the talkback being hidden problem. As the Blue Raja says: "Cheerio!" |
|
|
"me": the ad you're complaining about can be eliminated using Adblock. Just set Adblock to block this iframe. |
|
|
this is very nice. can you also do something about the text ads at the bottom of haaretz articles. the ads overwrite the first few talkbacks... this is in firefox 2 on windows. thanks! |
|
|
This is *so* useful. Makes the Ha'aretz site actually readable. Kol hakavod. |
|
|
Hi Anonymous One, I appreciate your effort, but I can't understand exactly what you fixed. Why don't you e-mail me with precise details? I'm at liorzur -at- yahoo -dot- youknowwhat. |
|
|
Sorry, I'm logged in through BugMeNot. I hope line breaks will work this time. Here is an example article that doesn't get patched: http://www.haaretz.co.il/hasite/spages/776414.html I haven't noticed if all articles are like this, or only the article above which I wanted. I've solved this, and here is the diff: 65c65 < var reListPrintEdition = /^http:\/\/www\.haaretz\.co\.il\/hasite\/spages/; --- > var reListPrintEdition = /^http:\/\/www\.haaretz\.co\.il\/hasite\/pages\/LiArtPE/; 215c215 < "//td[@width='280']", --- > "//td[@width='120']", 228c228 < "//td[@width='470']|//td[@width='470']/descendant::*[@width='470']", --- > "//td[@width='468']|//td[@width='468']/descendant::*[@width='468']", 232c232 < thisElement.setAttribute("width","760"); --- > thisElement.setAttribute("width","588"); |
|
|
Sorry, I'm logged in through BugMeNot Here is an example article that doesn't get patched:
I haven't noticed if all articles are like this, or only the article above which I wanted. I've solved this, and here is the diff: 65c65
|
|
|
This is an amazing script. It actually makes this site readable! Very good work. I install this on every computer I arrive, and if I get to view haaretz' site using explorer.. baah.. I think that these kind initiatives shows the power of having an extendible, open-source browser. Yishar Koah! |
|
|
Hi Lior! Thanks for the script. Works fine so far. My only problem is that the pages other than the main page are opened with wrong encoding (Hebrew Visual instead of Hebrew (Windows - 1255)), so numbers and words get a bit mixed up.
|
|
|
Anak!!! :))
by the way, the first article had this message: "Sorry, there was a problem loading the article. Please try again, or try another link. If you conclude the script has broken, report to me." All the other articles were ok!
|
|
|
Hi mishu, thanks for informing me. It seems the script wasn't compatible with the new Firefox 1.5 and its new greasemonkey. I tried to update it, and should work now. It's still in beta, so tell me of any further problems. You should note that Haaretz's site is a bit messy, so some problems in Firefox 1.5 are its own fault. |
|
|
Hey there, came across your script here that looks really promising- but unfortunately apart of expanding the columns of the main page, for some reason it doesn't work, and I'd love to see the outcome. the idea of reading articles in the body of the main page is great!!!
|