How to hide iframe src link?
When you debug, you can see: <iframe src="blob:https://www.nodejsauto.com/blah-blah"...
Where src youtube???
Youtube here
This is code: creat elem <div id="htmlTest"></div>
// var blobMe= URL['createObjectURL'](new Blob([''], {type: 'text/html'})); var elIframe = document['createElement']('iframe'); elIframe['setAttribute']('frameborder', '0'); elIframe['setAttribute']('width', '100%'); elIframe['setAttribute']('height', '500px'); elIframe['setAttribute']('allowfullscreen', 'true'); elIframe['setAttribute']('webkitallowfullscreen', 'true'); elIframe['setAttribute']('mozallowfullscreen', 'true'); elIframe['setAttribute']('src', blobMe); var idOne= 'gepa_'+ Date.now(); elIframe['setAttribute']('id', idOne); document.getElementById('htmlTest').appendChild(elIframe); const iframeHere= 'https://www.youtube.com/embed/GdIEi4lIH_Q'; document['getElementById'](idOne)['contentWindow']['document'].write('<script type="text/javascript">location.href = "' + iframeHere + '";\x3c/script>');
./.
Hello,
ReplyDeleteThanks for the code I've been looking for something similar for months.
But I don't know HTML/JavaScript and I couldn't get the code to work.
Because I copy paste it as it is :P
Is there more to it?
Regards,
Ahmad.
don't forget:
Deletecreat element with id="htmlTest"
Hello,
ReplyDeleteI wanted fembed tool: https://tool.baoxinh.com/fembed.cg
If you want to sell it, I will purchase it.
Waiting for your reply.
please read mail
DeleteHello, I would also like that tool, could you share the code?
Delete@Jesus Cotito: I push my code on piecex, can in weekend free souce...
DeleteThat's fine thanks
DeleteHello, could you share the code?
ReplyDeleteIs there a script that can batch hide scr links? so I don't have to manually create the html files for lots of links
ReplyDeleteYour code doesn't work. I copied and pasted but it doesn't show the player. Here's live demo of the code https://jsfiddle.net/0zbncyo5/
ReplyDeleteThis is working....it doesn't run on jsfidde but it does on codepen. I have also implemented it on a clients website to great success. Excellent work!
DeleteI can see that it does work in codepen but when I try it on my live site it doesn't work. Would you mind sending me an example file? i think it may be needing extension file?
Deleteto run on jsfiddle, change `<` => `\x3c`
Deletehow to change src to clicked
ReplyDeletejavascript code, let's code by search your idea
DeleteCan you do this with video tag
ReplyDelete