This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Promise = require('bluebird'); | |
var callbackHellTimeout = function(cb, time) { | |
setTimeout(function() { | |
cb(); | |
}, time); | |
}; | |
var promiseTimeout = function(time) { | |
return new Promise(function(resolve, reject) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getTitle() { | |
var title = document.getElementById('title').value; | |
} | |
function getContent() { | |
var content = ''; | |
if (tinyMCE.editors[0]) { | |
content = tinyMCE.editors[0].getContent().replace(/^<p>|<\/p>$/g, ''); | |
} else { | |
content = document.querySelector('#content-textarea-clone').innerHTML; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function absScriptLoc(filename) { | |
var scriptElements = document.getElementsByTagName('script'); | |
for (var i = 0; i < scriptElements.length; i++) { | |
var source = scriptElements[i].src; | |
if (source.indexOf(filename) > -1) { | |
var location = source.substring(0, source.indexOf(filename)) + filename; | |
return location; | |
} | |
} | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="../paper-calculator/paper-calculator.html" rel="import"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
#design_host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="../cool-clock/cool-clock.html" rel="import"> | |
<link href="../yt-video/yt-search-video.html" rel="import"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
#design_host { | |
position: absolute; | |
width: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="../topeka-elements/theme.html" rel="import"> | |
<link href="../topeka-elements/topeka-resources.html" rel="import"> | |
<link href="../topeka-elements/topeka-quizzes.html" rel="import"> | |
<link href="../topeka-elements/topeka-quiz-view.html" rel="import"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
#design_host { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="../topeka-elements/theme.html" rel="import"> | |
<link href="../topeka-elements/topeka-resources.html" rel="import"> | |
<link href="../topeka-elements/topeka-quiz-view.html" rel="import"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
#design_host { | |
position: absolute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="../core-drawer-panel/core-drawer-panel.html" rel="import"> | |
<link href="../core-menu-button/core-menu-button.html" rel="import"> | |
<link href="../core-icons/core-icons.html" rel="import"> | |
<link href="../core-item/core-item.html" rel="import"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
#design_host { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="../topeka-elements/theme.html" rel="import"> | |
<link href="../topeka-elements/topeka-resources.html" rel="import"> | |
<link href="../topeka-elements/topeka-quizzes.html" rel="import"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
#design_host { | |
position: absolute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="../topeka-elements/theme.html" rel="import"> | |
<link href="../topeka-elements/topeka-resources.html" rel="import"> | |
<link href="../topeka-elements/topeka-app.html" rel="import"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
#design_host { | |
position: absolute; |