How do I use an HTML embed code on Wikia? I've tried looking elsewhere, but some of the only help I've found is outdated by years and doesn't work anymore.
How do I use an HTML embed code on Wikia? I've tried looking elsewhere, but some of the only help I've found is outdated by years and doesn't work anymore.
CoinsCP wrote: Darn, neither of those pages are working on my wiki, even for review.
Personal JS can be turned on in Special:Preferences > Under the Hood > Enable personal JS.
I'm trying to put it on my Common.js but it's taking in a lot of errors, even though I've tested the code on places where it can be regularly embedded and it's working fine there.
$("#iframeloader-CoinsCP").replaceWith(' <iframe width='300' height='169' src='http://video.disney.com/embed/5272fff3d23b2f9628e2c8b8' frameborder='0' allowfullscreen scrolling='no'></iframe> ');
Any help?
Should be:
$("#iframeloader-CoinsCP").replaceWith(' <iframe width="300" height="169" src="video.disney.com/embed/5272fff3d23b2f9628e2c8b8" frameborder="0" allowfullscreen scrolling="no"></iframe> ');
You can't use single quotes within single quotes, nor double quotes within double quotes in JavaScript.
Yes the above poster is correct.
Hopefully everything will work fine now :P
It works! Thank you so much!
Do note that Wikia rarely, if ever, allows embedding iframes due to potential security exploitations (which is why verbatim was removed in the first place). So it's very likely that your JS might be rejected.
It didn't ask for review...it immediately let me put it on my wiki's front page. Here's the live version.
Because you placed the code into your personal JS, other users without that same code are unable to see it.
Noreplyz wrote: Because you placed the code into your personal JS, other users without that same code are unable to see it.
Darn...