0

Hello I want to disable this script for twitter widget to be displayed on some pages. How can I access the script from the backend and change the url on runtime?

<script id="twitter" src="http://widgets.twimg.com/j/2/widget.js">

Thanks in advance

1 Answer 1

1

That's not really possible.. modern browsers will leave the code in memory even if you remove the script tag from the DOM itself.

The only way around I can think of is to "overwrite" the object/functions: in the bottom of the page have your own script defining exactly the same functions and objects like that script, except they will be null/empty so the final result is like removing the script.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.