Ynet Links and Vids

Last update on Oct 25, 2005

Replaces javascript links with normal links on ynet.co.il, and enables embedded video clips in articles (v2.7).

Replaces javascript links with normal links on [ynet.co.il](http://www.ynet.co.il/), and enables embedded video clips in articles (*v2.7*).

Here's an example of a video preview:
!http://img254.imageshack.us/img254/4751/ynetlinksandvidsscr4pm.jpg!

Clicking the image will show the movie (properly embedded).

_New in v2.7_:
* Major refactoring.
* Instead of replacing the iframes with divs, the script replaces the iframes' content.
* The script now waits for the image to partly load before it goes on checking its size.
* All popups are made resizable.
* When visiting ynet.co.il, a menu item is added under Tools|Greasemonkey|User Scripts Commands to toggle direct video links, instead of embedding the player inside the page. This feature was added by request, and doesn't always work. If Ctrl is pressed while clicking the link, the movie is always embedded.
* bug fix: previously, some unusually named preview images were not shown.




You could comment on this script if you were logged in.

19 comments Feed-icon

1 point
login to vote
shalev.ethan scriptwright
Posted Aug 24, 2008

I just created a new version of this script based on Jillian's great work, and fixed it so it handles the new videos. see it here.
Jillian, you're free to take my code, and use it as a version update for this script. no good will come from having two separate branches.
Everyone else - please let me know if this script gives you any problems.

1 point
login to vote
tulipcorp user
Posted Jul 28, 2008

A new version of the video player appears and caused the script not to function:
http://www.ynet.co.il/articles/0,7340,L-3574469,00.html

For now, the new version doesn't replace the old one and both version in use.

Can u please update this useful script?

1 point
login to vote
geus user
Posted Jul 28, 2008

notice that the video is changed and not working.

1 point
login to vote
Uri user
Posted Sep 2, 2007

Very nice - One problem though. Ynet posts most vids with objtype application/asx (Multiple vids).

Your script translates all vids into objtype video/x-ms-wmv - Causing mplayer/VLC plugins to only play the first vid (The ynet logo vid) or not play anything.

Doing this on line 134:
obj.type = "application/asx";

Solves the problem - but it would be better to parse the asx file and extract the desirable content and filter out the ads.

Unfortunately, my JS is nonexistent... :-)

1 point
login to vote
HuBeZa user
Posted Jul 17, 2007

סוף סוף אפשר לפתוח לינקים בטאבים
כל הכבוד

1 point
login to vote
Eyal Soha scriptwright
Posted Jan 27, 2007

Oops, I meant LINE 265. In some links, the openinnewwindow() call is in the onClick. Put it in the href and delete the onClick.

1 point
login to vote
Eyal Soha scriptwright
Posted Jan 27, 2007

There are still some links unprocessed that need to be processed. Replace like 265 with this:

} else if(/(openInnewWindow|openWin|open)\b/.test(curLink.getAttribute("onClick"))) {
curLink.href = unescape(/\(['"](.+?)["']/.exec(curLink.getAttribute("onClick"))[1]);
curLink.removeAttribute("onClick");
}

1 point
login to vote
peuh-bugmenot scriptwright
Posted Dec 15, 2006

Amazing :) Do you have an email to be contacted by ? is there an .xpi version of this ?

1 point
login to vote
Jillian script's author
Posted Dec 11, 2006

After I checked ynetnews.com with v2.6, I realized I unwittingly made it work there too, which gave me the idea to work with the iframes and grease their content.
So starting with 2.6, the script works with ynetnews.com.
BTW, to install an .xpi file just drag it onto the Firefox window.

1 point
login to vote
Jillian script's author
Posted Dec 11, 2006

Ohad, I've added this functionality, but some movies will give error 404, and once clicked, the iframe turns blank. If someone fixes it, I'll update the script.

1 point
login to vote
Jillian script's author
Posted Nov 27, 2006

Ohad: Perhaps in the next version.

Nadav: Sorry, I barely have time to grease the sites I visit... I'd suggest to ask the Linux community for help, e.g. whatsup.co.il

Ethan: I tried it myself, but even with articles/1* I still get the <meta /> tag, so maybe ynet blocked that breach :).

Richard: Currently the script only works on ynet.co.il. I'll see what I can do about ynetnews.com

Thanks for the feedback!

1 point
login to vote
Nadav Kavale... scriptwright
Posted Nov 18, 2006

works great form me on debian sid with firefox 2, thanks :-)

( i use some of your other scripts too, great work !)

now, maybe you can help me...

I have this other issue, we put Linux in schools (here in Israel) using the ltsp.org as main architecture. but some of the schools sites are not displayed correctly. so can you please check them out to see if you can fix the javascript and get pied for it too.

here is one example of edusystems cms system used in one of the school...
http://www.atarnet.net/nodeweb.asp?t=25585 ( in which, the menu on the right does not work and also the combo links on the upper left does not work )

here is my email : nadavkav et gmail.com
:-)

1 point
login to vote
Ohad Lutzky scriptwright
Posted Nov 17, 2006

Would you consider adding functionality from http://userscripts.org/scripts/show/6416?

1 point
login to vote
ethan1701 user
Posted Nov 15, 2006

according to this article:
http://blog.goleshet.com/home/1163251711
you can prevent ynet from auto-refreshing pages by replacing the first parameter in the article's address from 0 to 1.
I would love to have this implemented in the next version of this add-on. Maybe even allow the user to decide if to allow auto refresh or not.

-Ethan

1 point
login to vote
Posted Nov 9, 2006

This script is not working for me. I have it installed & yet when I try to play Ynetnews video it does not work.

Is your script designed only to work at the Ynet Hebrew lang. site but not the YnetNews English lang. site?

Would you know of any way I can get video working in FF at the Ynetnews site? I downloaded an xpi file from the Ynetnews site but my PC isn't recognizing the file format & I can't open the file.

1 point
login to vote
Lior Zur scriptwright
Posted Aug 5, 2006

Fantastic! Seems to work great on the entire site. Great job.

As for Winter's remark - from my experience, the script works perfectly and doesn't affect the newsflash functionality.

What COULD be the problem is, if you have another, older, script that tries to fix Ynet's links, like the script YnetURLs. If you remove it, and also make sure you run the latest version of this script, there should be no problem.

1 point
login to vote
Winter user
Posted Apr 30, 2006

The only thing that prevents me from using this useful script is that it kills the newsflash functionality (when you click on a newsflash headline, it'll open it in the small newsflash window which makes it unreadable).

1 point
login to vote
thebigo195 user
Posted Feb 7, 2006

ata totach, this is great!!

1 point
login to vote
daniel Rozen... scriptwright
Posted Jan 4, 2006

Hallelujah! :)

You could comment on this script if you were logged in.