Skip to content

Commit

Permalink
Infrastructure: Add title to codepen page (pull #1596)
Browse files Browse the repository at this point in the history
  • Loading branch information
carmacleod committed Nov 9, 2020
1 parent b4cedce commit 064acca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/js/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,11 @@ function addOpenInCodePenForm(
''
);

var path = location.pathname.split('/');
var filename =
path.length > 0 ? path[path.length - 1].replace('.html', '') : '';
var postJson = {
title: filename,
html: exampleHtml,
css: '',
js: '',
Expand Down

0 comments on commit 064acca

Please sign in to comment.