| 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