Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pulling down embedded video files - solution
#7
[quote Jimmypoo]What is "the script" you mention, after GreaseMonkey?
// ==UserScript==
// @name Unembed
// @namespace http://neugierig.org/software/greasemonkey
// @description Adds a download link to embedded movies
// @include *
// ==/UserScript
//
// *** NOTE: there is an easier way to accomplish this than using this script.
// *** please see http://neugierig.org/software/greasemonkey/ for info.

(function() {
var xpath = "//embed";
var res = document.evaluate(xpath, document, null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
var i, embed;
for (i = 0; embed = res.snapshotItem(i); ++i) {
var dl = document.createElement('a');
dl.href = embed.src;
dl.appendChild(document.createTextNode('[download]'));
embed.parentNode.insertBefore(dl, embed.nextSibling);
}
})();

// vim: set ts=2 sw=2 :



>>

I did not write the script, but got it from the link I mentioned in the first post.
Reply


Messages In This Thread
Re: Pulling down embedded video files - solution - by john dough - 05-13-2008, 12:44 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)