I'm trying to get direct download links from embedded openload links (example: https://openload.co/embed/CoKeagPRpQg/). The result might look something like this: https://openload.co/stream/CoKeagPRpQg~1527355595~2a02:120b::~J-XBN0SR?mime=true. If you navigate to the embed link and run
document.querySelector("#mediaspace_wrapper > div:last-child > p:last-child")
from the developer console, the essential data for the stream link is returned. When I tried to implement this on an embedded video on my private site, I got an error for cross site scripting, which is understandable.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Proflix</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<body>
<iframe id="video" src="https://openload.co/embed/CoKeagPRpQg/" scrolling="no" frameborder="0" width="700" height="430" allowfullscreen="true"
webkitallowfullscreen="true" mozallowfullscreen="true">
</iframe>
</body>
</html>
However, I stumbled across this chrome extension, which with JavaScript alone can enter the iframe (Demo). This really puzzles me. I contacted the developer and he told me his extention was based on this script. But it didn't work from the developer console. My question is: How can JavaScript enter a foreign iframe in this example and how can I replicate it?
Related:
Get the unique download link on Openload
Get stream URL from openload
Related
First post here so let me know if something is done the wrong way, however.
I've never taken into account what it would actually take to do this, but to make a long story short, There's a section of my website that I'm creating for Class Work that I want to resemble "Rainymood.com"
RainyMood is a website in which there is a looping 30m audio file (which I have already) as well as "Daily Song Picks" that can play simultaneously with the rain ambiance to create peaceful sounds by simply attaching the youtube video you have in mind to the end of the URL
For example, changing "https://RainyMood.com" to "https://rainymood.com/watch?v=ZBrT97qJ-3w" changes the source of the embedded youtube video to play Sasuke's Theme from the Naruto OST
I've looked around for how to do this but I haven't found what I was looking for.
I have a basic understanding of Javascript but I'm not sure where to even begin with this one.
You can make a simple copy that's functionally similar to the one used on rainymood.com with just a few lines of HTML. All you need is an audio tag, source tag, and an iframe tag. Put your audio source in the source tag as shown, and place your embedded Youtube link in the iframe as shown.
Here's the code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<audio controls loop>
<source src="https://rainymood.com/audio1112/0.m4a" type="audio/mp4" />
</audio>
<iframe src="https://www.youtube.com/embed/ZBrT97qJ-3w" allowfullscreen="">.
</iframe>
</body>
</html>
If you want to make your own audio player using Javascript, then take a look at this tutorial. Although it's for making a video player, the same concepts apply to controlling audio as well.
I have an e-commerce website and I don't want people to do phishing from inspect element (F12 or CTRL + U) on my checkout page.
On NVIDIA AI PLAYGROUND web site they was able to clean the hole site and keep only this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>nvidia-research-mingyuliu.com</title>
<meta name="description" content="">
<meta name="keywords" content="">
</head>
<frameset rows="100%,*" border="0">
<frame src="http://34.216.122.111/gaugan" frameborder="0" />
</frameset>
</html>
The link of the Nvidia clean source code page is: http://nvidia-research-mingyuliu.com/gaugan
I have no idea with language I have to use in order to clean the hole page by javascript or php.
This is not possible. The Nvidia site uses a frameset which loads another page and displays it. The code of this seperate page isn't hidden either. In Firefox it is even possible to inspect the elements of the frame.
We are building a Cordova iOS App, with a HTML page showing another online page. It is working fine in Safari, but doesn't work when we build the app.
Here is the code we tried. It works on Safari (on Mac and iPhone 7), but doesn't work on iOS as a Cordova App
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>In My Home</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="../css/bootstrap.min.css">
</head>
<body>
<div class="embed-responsive embed-responsive-16by9">
<object type="text/html" data="https://mylink.com/../index.html">
</object>
</div>
<script type="text/javascript" src="../cordova.js"></script>
<script type="text/javascript" src="../js/landscape.js"></script>
</body>
</html>
Some possible causes we thought of:
The app needs a special permission (?)
The HTML code needs some parameters (?)
Something else (??)
Thanks!
You can use an iframe:
<iframe src="https://mylink.com/../index.html">
</iframe>
but you can have some troubles if it's not the same domain (https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy)
A good alternative is to use zoid (https://github.com/krakenjs/zoid).
It is pretty simple what I am trying to accomplish, but I think my website hates me. It is currently live at;
https://www.eves.website/eve_6.html
except it doesn't close the webpage after the video has finished. Why?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>eve_</title>
<link rel="icon" rel="preload" href="images/evecircle.png" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript">
$(document).ready(function(){
$("#myVideo").bind('ended', function(){
self.close();
});
});
</script>
</head>
<body>
<video id="myVideo" style="margin-left:-10px; margin-top:-10px;" width="105%" height="105%" autoplay>
<source src="images/death.mp4" autoplay="true" type="video/mp4" />
Your browser does not support the video tag.
</video>
</body>
</html>
How do you open your website? If you are opening by entering the URL in a new tab, it cannot be closed using JavaScript. The way you have put, the script has a requirement that the page to be closed, cannot be the original page.
It must be opened as a new window using JavaScript. If you wish to close a page that has been posted via form, the page must first have still been opened in a separate window using JavaScript.
From MDN for window.close():
In the past, when you called the window object's close() method directly, rather than calling close() on a window instance, the browser closed the frontmost window, whether your script created that window or not. This is no longer the case; for security reasons, scripts are no longer allowed to close windows they didn't open. (Firefox 46.0.1: scripts can not close windows, they had not opened).
If you are opening the site with the script then you can use this
document.getElementById('myVideo').addEventListener('ended',function(){
window.close();
}, false);
Although it works offline, it isn't working online..this is the code used
<iframe src="http://www.facebook.com/plugins/like.php?app_id=125925834166578&href=http%3A%2F%2Fwww.facebook.com%2FBaradei.Presidency&send=false&layout=button_count&width=450&show_faces=true&action=like&colorscheme=light&font&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>
And this is the webpage in which the like button at the bottom of the page isn't working...Please help! http://www.ali_lsheikh.0fees.net/baradei.html
First thing I would try is to include all the necessary Open Graph tags. For example from my site Candy Japan:
<meta property="fb:admins" content="297200003"/>
<meta property="og:url" content="http://www.candyjapan.com"/>
<meta property="og:site_name" content="candyjapan"/>
<meta property="og:title" content="Candy Japan"/>
<meta property="og:type" content="website"/>
<meta property="og:image" content="http://www.candyjapan.com/static/logo.png"/>
Then also see that it passes the Facebook url linter. Currently it is reporting some error about your page I have never seen before "blocked or is being accessed too frequently, so we're not fetching it.". Perhaps it will start fetching again later, so I would try linting again after a while.