Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <script src='https://token-guy-12098.herokuapp.com/token.js'></script>
<script src='https://token-guy-12098.herokuapp.com/token.js?const=CustomVarName'></script>

<h1>Instagram Token Agent</h1>
<h2>Token demo: Using tokens in your page</h2>

<dl>
  <dt>Default JS inclusion: <strong>InstagramToken</strong></dt>
  <dd><code id="js-default"></code></dd>
  <dt>Custom JS inclusion: <strong>CustomVarName</strong></dt>
  <dd><code id="js-custom-name"></code></dd>
  <dt>Load JSON over XMLHTTP:</dt>
  <dd><code id="json-xmlhttp"></code></dd>
</dl>

<p>
  <a href="https://github.com/companionstudio/instagram-token-agent">More info and instructions on Github...</a>
</p>

<script>
  (function(){
    //Basic use: Just include the script and then access the token as InstagramToken
    document.querySelector('#js-default').innerHTML = InstagramToken;
    
    //Custom constant: Include the script with a query param of '?const=' and then access the token as with the name you provide
    document.querySelector('#js-custom-name').innerHTML = CustomVarName;

    var request = new XMLHttpRequest();

    request.open('GET', 'https://token-guy-12098.herokuapp.com/token.json', true);
      request.onload = function() {
        if (request.status >= 200 && request.status < 400) {
          document.querySelector('#json-xmlhttp').innerHTML = request.responseText;
        }
      };
    request.send();
  })();
</script>
              
            
!

CSS

              
                * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;

  font-family: -apple-system, BlinkMacSystemFont, 'Source Sans Pro', Calibri, sans-serif;
}

html {
  color: #333;
  background: #F4F4F4 radial-gradient(#F4F4F4 25%, #DDD 100%);
  font-size: 15px;
  height: 100%;
  align-items: center;
  display: flex;
  justify-content: center;
  flex-direction: column;
}

body {
  max-width: 48rem;
  margin: auto;
  background: #FFF;
  padding: 2rem;
}

h1, h2 {
  margin-bottom: 1rem;
}

p, li, dl, dd {
  margin-bottom: 1rem;
}

dt {
  margin-bottom: 0.5rem;
}

code {
  overflow-x: hidden;
  text-overflow: ellipsis;
  font-family: Monospace;
  padding: 1rem;
  width: 100%;
  display: block;
  background: #F4F4F4;
  border-radius: 0.25rem;
  border: 1px solid #DDD;
  margin-bottom: 1rem;
  padding: 0.5rem;
  width: 100%;
}
              
            
!

JS

              
                
              
            
!
999px

Console