Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div style="text-align:center">
What Fucking Scene Should We Do?

<div id="content" style="visibility:hidden;">
  A fucking <span id="sceneMood"></span> <span id="sceneType"></span> scene with <span id="sceneImplements"></span> and <span id="sceneThing"></span>.

    Maybe we can also use <span id="maybe"></span>.

<button id="generate" style="">
  Give me my fucking scene




                function randomNumber(length) {
//  console.log('length ', length)
  return Math.floor(Math.random() * length);

function getRandomValue(array) {
//  console.log('here: ', array)
  return randomNumber(array.length);

function createScene() {
  var sceneImplementsIndex = 0;
  for (var key in parameters) {
    if (parameters.hasOwnProperty(key)) {
      var index = getRandomValue(parameters[key]);
      document.getElementById(key).innerHTML = parameters[key][index];
      if (key === "sceneImplements") {
        sceneImplementIndex = index;
  var maybeIndex = getRandomValue(parameters.sceneImplements);
  var maybe = document.getElementById("maybe");
  if (maybeIndex !== sceneImplementsIndex) {
    maybe.innerHTML = parameters.sceneImplements[maybeIndex];
  } else {
    var isNotLastIndex = parameters.sceneImplements[maybeIndex + 1]
    maybe.innerHTML = parameters.sceneImplements[isNotLastIndex ? maybeIndex + 1 : 0];

function makeVisible() {
  document.getElementById("content").style.visibility = "visible";

var parameters = {
  sceneMood: ["sensual", "silly", "sadistic", "rough"],
  sceneType: ["rope", "impact", "abduction", "fire", "rough body play", "fear", "objectification", "degradation", "humiliation", "bondage", "pet play", "shame"],
  sceneImplements: ["floggers", "whips", "clothespins", "canes", "paddles", "butt plugs", "candles", "feathers", "rabbit fur", "a Hitachi", "food", "plastic wrap", "hoods", "clothespins"],
  sceneThing: ["mindfucks", "sexiness", "balloon animals", "wax", "figging", "pressure points", "knives", "tickling", "bastinado", "gags"]

$("#generate").on("click", function() {