Twitter link gags preview

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Post Reply
reacher
Posts: 40
Joined: Fri Oct 28, 2011 11:16 am

Twitter link gags preview

Post by reacher »

Using latest build of WeBuilder 2014: adding a twitter link (enclosed) causes major hanging when trying to preview.

Code: Select all

<a href="https://twitter.com/XXXXXXX" class="twitter-follow-button" data-show-count="false">Follow @XXXXXXX</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
Cheers
User avatar
Aivars
Blumentals Software Developer
Posts: 2462
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Twitter link gags preview

Post by Aivars »

The delay in preview is caused by this line: js.src="//platform.twitter.com/widgets.js"

Change it to either js.src="http://platform.twitter.com/widgets.js" or js.src="https://platform.twitter.com/widgets.js" and the problem will go away. The reason for this is the fact that preview is displayed from local filesystem not web server so the browser is actually looking for //platform.twitter.com/widgets.js on your filesystem, probably trying to create a local network connection to non-existing location, which causes the delay.
Blumentals Software Programmer
reacher
Posts: 40
Joined: Fri Oct 28, 2011 11:16 am

Re: Twitter link gags preview

Post by reacher »

Thanks, I should have seen that but am a dumbass...
User avatar
Aivars
Blumentals Software Developer
Posts: 2462
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Twitter link gags preview

Post by Aivars »

No you're not :)
Blumentals Software Programmer
Post Reply