The indentation in this script could work... settle on a consistent scheme of indenting. (If you like, use http://jslint.com/ to check scripts for errors -- it takes a bit of work at first, but that's because Javascript is such a sloppy language.)

On 2010-03-08 10:27, ryangetz wrote:
// ==UserScript==
// @name           Streamed Video MU
// @namespace      http://streamedvideo.hebfree.org/
// @description    Lorsque qu'un fichier vidéo est sur le point d'être
téléchargé,  il est automatiquement lu en streamming.
// @version       0.1
// @include        *megaupload.com/?d=*
// ==/UserScript==





   var x=document.getElementsByTagName("a");
   for (i=0;i<x.length;i++)
{
var y=x[i].getAttribute('href');
var patt1=new RegExp(".avi$|.divx$");
var ok=patt1.test(y)


if (ok == false) {
}

These two lines are a no-op, so take them out (and the following 'else' in the next line, obviously).

else if ( ok == true ) {

Just say (assuming you took out the no-op lines preceding) -- checking against true isn't necessary or even recommended:

if ( ok ) {


input_box=confirm("   Streamed Video :" + '\n' + '\n' + "Would you
like to Stream this video with DIVX-Player");
if (input_box==true)

{

openTab(y);
}

else
{

}

Another four lines of no-op.

}
}
function (asdf) {

This function doesn't have a name and so can't be called; change it to this? (asdf is a pretty bad variable name, by the way, as it means nothing.)
function openTab(url) {

var div = document.createElement("div");
div.className = 'movie';
movie.innerHTML = '<iframe src="http://www.icedivx.com/video.php?
vurl=" + y></iframe>'

There looks to be some typos there (and maybe also some line-wrapping trouble). Correct form should be (all on one line):

movie.innerHTML = '<iframe src="http://www.icedivx.com/video.php?vurl=";' + y + 
'></iframe>'

Or, to make good use of the function parameter, which I recommend:

movie.innerHTML = '<iframe src="http://www.icedivx.com/video.php?vurl=";' + url + 
'></iframe>'

}

_____________________________________________________________

  Please bare with me im really new at all of this! I cannot figure out
  whats going on, at the bottom of my grease monkey script i am trying
  to get a floating iframe to load ontop of the megaupload website to
  stream the downloading avi through the DivX Web Player at
"icedivx.com/
  video.php?vurl=".   The code to find the download link and pass it
  works flawlessly i just need to know how to get a floating iframe to
  load with icedivx.com.

Sorry the first post i had was the old script heres the new one! still
dont work!

Hope this helps you!

--
cc | pseudonymous |<http://carlclark.mp/>


--
|| 640K ought to be enough RAM for anybody. - misattributed, 1981 || http://tagzilla.mozdev.org v0.066

--
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to