Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Bug 1148743 - Open jsfiddle and CodePen for Samples #3240

Closed
wants to merge 7 commits into from

Conversation

darkwing
Copy link
Contributor

@darkwing darkwing commented Jun 9, 2015

Supercedes #3147

@iakshay I don't see where we use .sample-code-frame or .sample-code-table -- is that something that needs to be added to the Embed template or...?

@iakshay
Copy link
Contributor

iakshay commented Jun 9, 2015

Yep, you can see the updated template in the gist -https://gist.github.com/iakshay/18dba5dac3d6ce99967d

@darkwing
Copy link
Contributor Author

darkwing commented Jun 9, 2015

OK, I've updated this so it works. \o/

Something to note: we're going to fight popup blockers, and of course, we can't prevent that. @hoosteeno

@stephaniehobson Wanna do a style or usability check here?

@stephaniehobson stephaniehobson self-assigned this Jun 9, 2015
@darkwing
Copy link
Contributor Author

@hoosteeno : Also of note re: popup blockers, if the user chooses "allow popups", the window opens but the post data (the CSS, HTML, and JS) doesn't get delivered, so our functionality will appear broken, at least in Firefox.

@stephaniehobson
Copy link
Contributor

Review is going to be delayed until I have the new VM running, sorry!


function openJSFiddle(title, htmlCode, cssCode, jsCode) {
var $form = $('<form method="post" target="_blank" action="https://jsfiddle.net/api/mdn/" class="hidden">'
+ '<input type="hidden" name="html" />'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JSHint suggests the "+" for each of these multi-line declarations should go on the preceding line.

@stephaniehobson
Copy link
Contributor

I'm not able to get it to run locally. What am I missing:

  • downloaded PR and complied style sheets
  • added and enabled the wiki_samples waffle flag
  • updated the EmbedLiveSample macro and refreshed the page

The class live-sample-frame is appearing on the iframe and wiki-samples.js is being included on the page.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants