Social-feed - API - javascript

I am begining to work with API's and am trying to get a working example of the Social-Feed API (https://github.com/pavelk2/social-feed) on a template HTML.
I have installed bower as instructed in the Github.
I have the dependency scripts loading in just before the closing body tag, A div container for the social feed script and the social feed script within that div.
I am unsure as to why the API is not working. here is a link to the code I am using: https://codeshare.io/5DAwel
Thanks

I think you have to put those links to the scripts into the 'head /head' area of your side.
Compare your source code with the source of the demo page: https://pavelk2.github.io/social-feed-example/

Related

Why I can't embed Twitter in my dash app?

i'm trying to embed the twitter timeline of an account in my dash app. I noticed that it does not work if i put the following code into the app entry :
dash_dangerously_set_inner_html.DangerouslySetInnerHTML(< a class="twitter-timeline" href="https://twitter.com/TwitterDev/timelines/539487832448843776?ref_src=twsrc%5Etfw"></a>
< script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>').
Probably the js script is not running, indeed if I try to put it directly into source code the iframe that I need is generated. Unfortunately, the CSS is of this frame is difficult to set and it is displayed on all the pages, while I need to put it into the right section.

integrate Accelerated Mobile Pages in vivvo template

I am working on vivvo template. Which is completed, now I have to integrate Accelerated Mobile Pages (AMP) in it. To reference amp js file use this
<script async src="https://cdn.ampproject.org/v0.js"></script>
but this file did't included in pages. And all reference files css and js after this line didn't loaded. I followed this link to use amp
Create Your First AMP Page
What am i missing. Please help. Thanks
Well for a start you can't use any other CSS files (inline CSS only) nor Javascript.
What do you mean "this file did't included in pages"? That piece of javascript is mandatory on an AMP page (it's what makes it an AMP page).
Also have you used the #development=1 option in Google Chrome? Append that to your URL and then reload the page with Developer tools open and look at the console to see errors.
I've blogged my own experiences creating AMP pages here: https://www.tunetheweb.com/blog/implementing-accelerated-mobile-pages/ as there were a few funnies I didn't realise until I started implementing them.

Linking to the end of another page in which i have no access to the source of

The website i'm trying to link to is pretty much a text document (see below), i'm trying to link to the last line preferable, highlighting it would be ideal but a link to the end of the page would work.
I've tried various code snippets, but as i have no access to the code of the page i cannot create anchor in the target page and link directly to that.
if i can get the following code to run on the page once i have navigated to it, i believe that would solve the problem, but my JS knowledge does not extend that far
window.onload=toBottom;
function toBottom()
{
alert("Scrolling to bottom ...");
window.scrollTo(0, document.body.scrollHeight);
}
i am linking using the following code
`— Alan Turing `
http://www.loebner.net/Prizef/TuringArticle.html
I would deeplink and find an ID on the remote page and link directly to that so for example
www.loebner.net/Prizef/TuringArticle.html#ELEMENTID
However if the page does not have an element at the bottom with an ID then might be a problem, do you have access to that page to add an ID?
Cleanest solution was contacting the site administrator of the site and setting up a mirror on my server of the original file and adding an #ID to the element i wanted to deeplink to and linking to the #ID from within my webpage
href="<c:url value="loebner#ID"/>"

how does jwplayer initialize when embedded in sitefinity?

We are using a Sitefinity portal and have the jwplayer on one of our pages. When I edit the page, all I see in the HTML code is a DIV with an ID for the video player. I do not see any reference to the javascript code. However, when I load the page, I see the setup() function and the script reference to the .js file.
I am trying to figure out where and at what point the setup() and reference to the .js code is loaded into the page.
We are experiencing a problem where the Sitefinity portal is loading over https and the media content (a remotely hosted .mp4 file) is loading over http. Because of the mixed https/http content this will not load on the page.
Any help is much appreciated!
Thanks!
Bob
Where did you put the js in the first place? You cannot edit tags in a Content Block.
As an alternative you can add a Javascript widget to the page ("Scripts and Styles" section). You won't have it double once you save the Content Block with the js stripped.

Add query string to script tag link in asp.net to break Cache

Hope someone can help me on this. I manage an ASP.Net website and usually update script files and css files very often. I add current time appended into a single string as a query string parameter (eg: profileImage.jpg?123021) which makes the browser to look for the file without getting it from cache.
How can I do the same thing to all script tags and css links from the server side so that it loads the latest version of the file.
Any help appreciated.
Amila
If your asp.net website uses Master Pages, it should be easy to make these changes in the Master Page file. Look a file with the extension .master. If you are not sure how to make the specific edit, post the <head> area from the master page markup in a new question.
MSDN Master Pages: http://msdn.microsoft.com/en-us/library/wtxbf3hh(v=vs.100).aspx
If your site does not use master pages, then you'd need to create some server-side logic that affects the <head> section of the page. Below are some links to related QA's about injecting script and styles from the server side.
ASP.NET: How to (programmatically) attach a <script> tag, containing a link to .js, to <head>?
How to Add script codes before the </body> tag ASP.NET

Categories

Resources