Skip to content

Instantly share code, notes, and snippets.

/example.js.coffee
Created Jul 21, 2014

Embed
What would you like to do?
newResource: (e) =>
e.stopPropagation()
e.preventDefault()
@resources ||= []
if @resources.length > 0
a = _.last(@resources)
url = a.url
extension = url.split(".")[6]
switch extension
when 'css'
console.log 'it is a css'
when 'js'
console.log url
console.log '<script src="url"></script>'
else
console.log 'test'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.