Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript in Post/Loaded Page will not be performed #718

Closed
uponity opened this issue Sep 14, 2017 · 12 comments
Closed

Javascript in Post/Loaded Page will not be performed #718

uponity opened this issue Sep 14, 2017 · 12 comments

Comments

@uponity
Copy link

uponity commented Sep 14, 2017

This Code will not be loaded in a infinite scroll loaded Page or Post:

<script src="https://scripts.tracdelight.com/tracdelight.js?accesskey=ac9a4cce18b76fdb586db1607be5bcec" async="async"></script>
<div class="td-widget" data-td-args="{'widget':'65n1sutdhx83mzfk'}">&nbsp;</div>

Have anyone a Solution for this?

Regards,
Danny

@desandro
Copy link
Member

Thanks for reporting this issue. I believe the problem may be async attribute on the script tag. I'll have to investigate.

@uponity
Copy link
Author

uponity commented Sep 25, 2017

Hello, do you have some news for me?
Regards,
Danny

@josearagon
Copy link

I have same problem. Any news from this?
Thanks

@asurcodes
Copy link

asurcodes commented Nov 28, 2017

The same problem here, in my case I need to load Google ads along with the content, but the script tags loaded are empty, like so:

<div id="ad-5a1d3b1e824b9" class="ad">
    <script type="text/javascript"></script>
</div>

I've already checked and the content is retrieved ok, so I guess it has something to do with the append process.

EDIT: I found out that the library doesn't support actual script tag content, but it does support attributes, so a possible solution would be to extract it to a .js file. In my case this isn't possible so any other suggestions are appreciated.

Asur

@j1f
Copy link

j1f commented Dec 30, 2017

I'm also facing this problem, any news about this?

@happynautpro
Copy link

Any Updates on this? I have the same problem.

@sechix
Copy link

sechix commented Mar 23, 2018

Me too ... Any workaround?

@sechix
Copy link

sechix commented Apr 4, 2018

Any updates?

desandro added a commit that referenced this issue Apr 13, 2018
@desandro
Copy link
Member

🎉 v3.0.4 has been released with a patch added for executing the inline code in scripts.

Now, Infinite Scroll will execute JS code that's like:

<script>
  console.log('hello page 2!')
</script>

Please update!

@desandro desandro removed their assignment Apr 13, 2018
@sechix
Copy link

sechix commented May 1, 2018

Hi, Now keep the scripts, but in my case not execute external scripts as for example modal popup inside new elements scrolled

@desandro
Copy link
Member

desandro commented May 2, 2018

@sechix Do you have a live URL I can take a look at? See Submitting Issues in the contributing guidelines.

@desandro
Copy link
Member

I'm closing this issue as resolved. Please open a new issue if this issue pops up again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

7 participants