javascript - Change Adfly ads to js -
im trying inject js file.
<script> var adfly_id = 3793905; var adfly_advert = 'banner'; var frequency_cap = 5; var frequency_delay = 5; var init_delay = 3; </script> <script src="adf.ly/js/entry.js"></script>
and load adding page.
<script type="text/javascript" src="http://server.com/adfly.js"></script>
is possible? because have no luck.
i try this...
document.write('<script type="text/javascript">var adfly_id = 3793905;var adfly_advert = 'int';var frequency_cap = 5;var frequency_delay = 5;var init_delay = 3;</script><script src="cdn.adf.ly/js/entry.js"></script>');
--
var adfly_id = 3793905; var adfly_advert = 'int'; var frequency_cap = 4; var frequency_delay = 5; var init_delay = 3; src="cdn.adf.ly/js/entry.js"
and
var sc = document.createelement('script'); sc.src = "adf.ly/js/entry.js" document.body.appendchild(sc); unsafewindow.adfly_id = 3793905; unsafewindow.adfly_advert = 'int'; unsafewindow.frequency_cap = 5; unsafewindow.frequency_delay = 5; unsafewindow.init_delay = 3;
and dint work of codes. can me thanks.
you're quite close on last piece of code.
the problems there don't define script type, , place in body
instead of head
.
this adapted copy google dfp:
var ads = document.createelement('script'); ads.async = true; ads.type = 'text/javascript'; var usessl = 'https:' == document.location.protocol; ads.src = (usessl ? 'https:' : 'http:') + '//adf.ly/js/entry.js'; var node = document.getelementsbytagname('script')[0]; node.parentnode.insertbefore(ads, node);
Comments
Post a Comment