11-06-2013, 06:15 PM
(This post was last modified: 11-06-2013, 06:16 PM by PatientZero.)
That script is actually pretty simple when you break it down.
All the code is doing is redirecting to an image located in the "http://thedilbertstore.com/images/periodic_content/dilbert/" directory and adding the filename based on the current date.
So long as the file names still follow the same pattern I think you should be able to remove the <img> tag from it and reference the javascript file as if it were an image, currently it's outputting html.
So uh, the last line would be;
and you'd reference it as
Personally I'd want to test that myself to be sure, I haven't worked much in Javascript so I might get getting wires crossed.
Assuming you've got it in a public folder I think it should work in dropbox, since I'm pretty sure javascript is run client-side and it's just spitting out a url.
Of course if anyone is more well versed in Javascript I'd listen to them if they say I'm talking garbage here.
All the code is doing is redirecting to an image located in the "http://thedilbertstore.com/images/periodic_content/dilbert/" directory and adding the filename based on the current date.
So long as the file names still follow the same pattern I think you should be able to remove the <img> tag from it and reference the javascript file as if it were an image, currently it's outputting html.
So uh, the last line would be;
Code:
document.write('http://thedilbertstore.com/images/periodic_content/dilbert/dt' + year + '' + month + '' + day + dayofweek + 'hct.jpg');
Code:
[img]http://whatever.butt/yourcode.js[/img]
Personally I'd want to test that myself to be sure, I haven't worked much in Javascript so I might get getting wires crossed.
Assuming you've got it in a public folder I think it should work in dropbox, since I'm pretty sure javascript is run client-side and it's just spitting out a url.
Of course if anyone is more well versed in Javascript I'd listen to them if they say I'm talking garbage here.