Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var xLBD = {};
xLBD.c = function (){
xLBD.f = unescape(document.querySelector("[flashvars]").getAttribute("flashvars")).substring(7);
xLBD.f = JSON.parse(xLBD.f.substring(0, xLBD.f.lastIndexOf("}") + 1)).video_data[0].hd_src;
xLBD.a = "<div style='position:absolute;top:100px;height:300px;left:15%;background:#fff;border:10px solid #000;font-size:5em;padding:100px;'>Click <a download='lookback.mp4' href='"+xLBD.f+"'>here<\/a> to download your lookBack video.</div>";
document.body.innerHTML += xLBD.a;
}
if(document.readyState == "complete")
xLBD.c();
else window.onload = xLBD.c;
@desaiuditd

This comment has been minimized.

Copy link

commented Feb 4, 2014

+1

@asadm

This comment has been minimized.

Copy link

commented Feb 4, 2014

thanks

@janwillemm

This comment has been minimized.

Copy link

commented Feb 4, 2014

Awesome, thanks!

@Gazer

This comment has been minimized.

Copy link

commented Feb 4, 2014

Thanks!!

@knowsudhanshu

This comment has been minimized.

Copy link

commented Feb 4, 2014

How to use this :\

@ironbishop

This comment has been minimized.

Copy link

commented Feb 4, 2014

Great!!! 👍

@anshusrii paste that code in a javascript debugger and press enter :) (the debugger opens with CTRL+SHIFT+k on Firefox)

@inestm89

This comment has been minimized.

Copy link

commented Feb 4, 2014

I dont know how to do this. can anyone explain to me?

@dfroberg

This comment has been minimized.

Copy link

commented Feb 4, 2014

Thanks :) +1

@mauris

This comment has been minimized.

Copy link

commented Feb 4, 2014

Works on Firebug too. +1 thanks!

@ironbishop

This comment has been minimized.

Copy link

commented Feb 5, 2014

@inestm89 you can use Video Download Helper on Firefox

or you can paste the code above in a javascript debugger (different combo for each browser)

browser combo
Firefox CTRL+SHIFT+k
Chrome CTRL+SHIFT+j
Safari CTRL+ALT+i
Opera CTRL+SHIFT+i
Internet Explorer F12 ...then click "Console"
@Usu04

This comment has been minimized.

Copy link

commented Feb 6, 2014

Why am i getting 'TypeError: Cannot call method 'getAttribute' of null' after pasting this code :/

@parvmittal

This comment has been minimized.

Copy link

commented Feb 6, 2014

I am getting this code after typing that code.

TypeError: Cannot call method 'getAttribute' of null
message: "Cannot call method 'getAttribute' of null"
stack: (...)
get stack: function () { [native code] }
set stack: function () { [native code] }
proto: Error

@jimmycerf

This comment has been minimized.

Copy link

commented Feb 6, 2014

S.O.S.!

@jimmycerf

This comment has been minimized.

Copy link

commented Feb 7, 2014

Success!

@nataliacardone

This comment has been minimized.

Copy link

commented Feb 16, 2014

var xLBD = {};
xLBD.c = function (){
xLBD.f = unescape(document.querySelector("[flashvars]").getAttribute("flashvars")).substring(7);
xLBD.f = JSON.parse(xLBD.f.substring(0, xLBD.f.lastIndexOf("}") + 1)).video_data[0].hd_src;
xLBD.a = "

";
document.body.innerHTML += xLBD.a;
}
if(document.readyState == "complete")
xLBD.c();
else window.onload = xLBD.c;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.