How do I embed a region of a site into another webpage? - javascript

Is it possible to embed a certain portion of a site into a wordpress page? For example, If I want to embed stackoverflow to my site, and be able to scroll only to a predermined feel how would I accomplish this?
I tried using
<iframe src="http://www.example.com"></iframe>
But that only shows a tiny portion and not exactly what I want it to show.
Is there a better way to mimic an embedded element of another site to even mimic the scroll so it's like its really part of the site.The page source is too much to comb through.
Hope you guys can help!
Thanks i'm still a noob.

Related

get source code of whole website - which loads additional content after scrolling down

I want to fetch this site
https://www.film-fish.com/modern-mindless-action
to fetch the IMDB IDs of all movies listed there.
The problem is that the page loads all movies listed there just after scrolling down. So, a simple wget doesn't work.
Even if I scroll to the bottom of the page and view the source code, I do not see the last movie in the list (Hard Kill (2020)).
So the problem seems to be that the content is being created via JavaScript.
Has anybody a tip on how to achieve that?
So the problem seems to be that the content is being created via a js
script. Has anybody a tip on how to achieve that?
Indeed, executing JavaScript code is beyond scope of GNU Wget. You would need browser automation tool. If you know some Node.js or JavaScript I suggest taking look at PhantomJS Quick Start, Page Automation. Please take look at first example in 2nd link, you should be probably able to rework to your needs, i.e. instruct page to scroll down using JavaScript then extract what you need using JavaScript.

How to hide image of external java sciprt code on wordpress site

I need a solution to hide a image of external javascript.
I have a website. I am using a free tracker service to track my visitor. So, the tracker give me a code which I placed in footer of my site. But the script create a little image icon. Which is clickable. So, anyone can see my site data.
So, I want to use the tracker code, but hide the image. Which make sure only I'm able to view all of my site data. The javascript code is encrypted or much complex. So, I can't solve my problem. I google for similar questions. But answer is not specific. As, I am a beginner, I need details instruction.
I added the source code. here "jbahe" is my username. My site is https://jagobahe.com
Thanks in advance.
<script src="//t1.extreme-dm.com/f.js" id="eXF-jbahe-0" async defer></script>
You can hide the image with CSS
#eXTReMe-Free-jbahe {
display:none;
}
Or if you must use JS
document.getElementById('eXTReMe-Free-jbahe').style.display = 'none'

Showing a frame of another site on a page

I am trying to create a small frame on my site that will show the home page of another site similar to what google is doing with your most viewed pages. I know how to create this with frames but I am really against frames in general for many reasons not worth mentioning. Is there a jQuery plugin somewhere that can do that for me?
For a more visual explanation go here and navigate to 'portfolio'. The current developer is using simple images for what he is doing. I would like those icons to be frames of other sites instead
You want an actual image of a webpage? You'd need something like html2canvas, but that'll be html5 only. There's some methods for doing this in PHP as well, but it's tricky, and I've only heard of this in theory, never actually practiced it myself.
How about this link?
Website screenshots using PHP
To embed an external page within your page, you should check out the <iframe> tag.
As pointed out in the other answer absolutely the best solution to embedding an external site into yours is usually an <iframe>.
You could, in theory, avoid using <iframe>s by pulling in the HTML from the external sites via ajax requests and injecting it into your page, as appropriate, using javascript. This is a much more heavyweight solution however and I wouldn't recommend it to solve your particular problem, but just to point it out.
What I would recommend however is just linking to the sites, potentially with target="_blank" so that the links don't send the browser away from your portfolio.
<iframe>s have their place for certain solutions, but for browsing the different sites you've worked on? No - I'd say the user would benefit from the full browser window experience for that.

How to load content in a "virtual window" like "LightBox"

I like how Lightbox does that overlay window that displays the full size image link. Is there a way to load an html file like that? I would like to have pictures, text, maybe an embedded youtube video too all able to load in that "Virtual Window", Vertical scrolling would be nice too. I would like to avoid jquery or other things like that. Like just Java, html, and css would be nice. But if that isn't possible I can handle calling the jquery if need be.
Thanks in advance to all you savvy people!
Eva
Recently, I've spent a lot of time trying to find nice no-jQuery lightbox. And I only needed to display images, not videos or HTML. My searches failed so in the end I had to give up and include jQuery in my site.
Once you give up have a look at Jquery Colorbox.
It has directly implemented display of images, YouTube or other videos as well as dynamically loaded HTML. See their examples.
Unfortunatelly, this library requires JQuery

Take 'snapshot' of website and load in iframe

This question is not really specific. I want to show thumbnail images of websites when hovering (its) url. With this code: JsFiddle
I can load websites in the iframe, which kinda 'resembles' a thumbnail preview. The problem is that it has to load the complete page which is not really fast and takes up quite some system performance. So my question is how can solve this problem? I can only think of two things myself:
1.Take some sort of 'snapshot' and show that snapshot instead of loading the page
2.Load only the css and other stuf but no object like movie files banner ads etc.
If those two are not done than please provide me with an alternative.

Categories

Resources