Posts that simon! is monitoring

Subscribe to Posts that simon! is monitoring 8 posts found

May 3, 2007
Adrian 44 posts

Topic: Inline Flash Mp3 Player

All you would have to do is change it so it loads the player onclick. You can do this by stripping out the load code and put it into a separate function.

Example:


// this is the only thing needed inside the for loop
page_links[i].addEventListener("onclick", loadPlayer, false);

// end for loop

function loadPlayer(event) {
  // change this line
  var url = "http://img235.imageshack.us/img235/9199/mediaplayerqv0.swf?&file="+escape(this.href)+"&song_title="+escape(this.textContent);

  // load code goes here

  page_links[i].parentNode.insertBefore(span, this); // replaces the last line
  event.preventDefault();
}

And that's it!

 
Apr 27, 2007
Tom Boshoven 1 post

Topic: Flash Controls (Pause button and a seek bar under Flash)

I think it should help as it is actually the same project xD
It never got much attention but to be honest my script kinda sucks.
Works on half the sites and breaks flashes on some other sites.
The lack of attention to my script made me just quit the project.
If you need my help with anything you can ask (although Im not good with JS, I know some things about the flash thingy and of course the way web pages are built up and the flash embedding dilemmas)
If you use any of my code please put my name in credits.

 
Apr 5, 2007
meno like-bu... 2 posts

Topic: Flash Controls (Pause button and a seek bar under Flash)

Maybe this could help???

Tom's FlashControl
http://userscripts.org/scripts/show/6860

 
Apr 4, 2007
Joel H 342 posts

Topic: Flash Controls (Pause button and a seek bar under Flash)

Simon,

It really wasn't that far off topic, and besides, you asked about it, too.

'Nop!? it's not working, and it keeps alert me "No scriptable flash on this page." even when i got flash, or maybe its only me!?'

Without even installing or running either script, I have found a problem. Re-read the diveintogreasemonkey link I sent earlier,
and then look at your headers. You are running this script on any and all pages you load, regardless of whether or not there
is any flash on them. Choose your favorite page you know to have flash on it and set yourself up to only run the script on that
page. If you still have problems, I suggest going over the source code and commenting every line so that you understand it.
Anything you don't understand, Google. If nothing else, this will be a good learning experience. If you have researched this
thoroughly, and are still continuing to have issues with it, post back what script you're using and the site you're using it on and
I'll see if I can't provide a better hint.

Happy Passover

-Joel

 
Apr 3, 2007
Joel H 342 posts

Topic: Flash Controls (Pause button and a seek bar under Flash)

Simon,

Most of the other threads wrap very nicely. You may notice some longer lines of text, specifically the scripts, look like they just continue very far to the right. This is caused by using long, continuous lines of text (no spaces). Word-breaking and pre-scrolling are two methods of ensuring that longer text like that doesn't mess up the page formatting, but will also be displayed in a manner that is true to the original intent (sometimes lines really do need to be that long). In your case, it was possible to break up your script into a few dozen different lines and it would work just as well, but it's an extra step and another thing to explain to break it up; additionally, you had already posted the script source before you could be aware of its impact.

In short, Henrik is trying to keep the site looking clean, without extending important text behind that infernal ad bar on the right (which remind me, i need to find/write a script to remove that...)

-Joel

 
Apr 2, 2007
Henrik N 215 posts

Topic: Flash Controls (Pause button and a seek bar under Flash)

:) Word-breaking/pre-scrolling code has been written for this site, just not brought live yet.

 
Apr 2, 2007
LouCypher 208 posts

Topic: Flash Controls (Pause button and a seek bar under Flash)

Now that you break the layout in this thread, you might also want to check Force Wrap user script, which is based on Jesse Ruderman's Force Wrap bookmarklet.

/shameless self promotion

 
Apr 1, 2007
Joel H 342 posts

Topic: Flash Controls (Pause button and a seek bar under Flash)

Simon,

Allow me to answer C first. Yes, someone can. This person is you.

The first step is to create a new notepad file on your desktop. Open it, and then add the script's metadata. You can (read: should) read about it at this site: http://diveintogreasemonkey.org/helloworld/meta...

When you're done, you should have something like this:

// ==UserScript==
// @name Hello World
// @namespace http://diveintogreasemonkey.org/download/
// @description example script to alert "Hello world!" on every page
// @include *
// @exclude http://diveintogreasemonkey.org/*
// @exclude http://www.diveintogreasemonkey.org/*
// ==/UserScript==

as the contents of your notepad file. Give yourself a few lines for spacing, then copy and paste either (not both) of your above functions into notepad. You will need to remove the very beginning "javascript:" because this is what tells your browser to execute the following as javascript; it is completely unnecessary in a greasemonkey script.

The next step is to save it. It must be saved as [something].user.js and so I would suggest saving it as FlashControls.user.js (save to your desktop).

Lastly, right click on the FlashControls.user.js script and open with firefox. You should see a popup asking you if you want to install this script; click install and you should be all set.

Hope this helped,
Joel