View css-variable-demo.html
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
<style> | |
/* defintion */ | |
--red-6: darkred; | |
/* use */ | |
h1 { | |
color: var(--red-6); | |
} | |
</style> |
View clear-github-notifications.js
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
let foundStuff = false; | |
let items = document.querySelectorAll('li.notifications-list-item') | |
items.forEach((item) => { | |
if(item.querySelector('img.avatar-user[alt="@dependabot-preview[bot]"]') || item.querySelector('img.avatar-user[alt="@dependabot[bot]"]') || item.querySelector('img.avatar-user[alt="@renovate[bot]"]')) { | |
console.log('did find one'); | |
foundStuff = true; | |
item.querySelector('input[type="checkbox"]').click(); | |
} | |
}); |
View components.x-hint\.js
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
import Component from '@ember/component'; | |
export default class extends Component { | |
} |
View controllers.application.js
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
View components.my-component.js
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
html: `<div> | |
<img src="https://via.placeholder.com/350x150" width="350" height="150" alt="Placeholder" /> | |
</div>`, | |
}); |
View controllers.application.js
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appData : { | |
"title" : "First Title", | |
"subtitles": [ | |
{ | |
"AMount":"4343" | |
}, | |
{ |
View adapters.application.js
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
import DS from 'ember-data'; | |
export default DS.RESTAdapter.extend({ | |
host: 'http://localhost:3000/api' | |
}); |
View components.edit-instance.js
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
store: Ember.inject.service(), | |
router: Ember.inject.service(), | |
actions: { | |
createInstance() { | |
let newInstance = this.get('store').createRecord('instance'); | |
this.set('instance', newInstance); | |
}, |
View controllers.application.js
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
filteredModel: Ember.computed('filterValue', 'model.@each.name', function() { | |
if(Ember.isEmpty(this.get('filterValue'))) { | |
return this.model; | |
} | |
return this.model.filter((test) => test.get('name') === this.get('filterValue')); |
View controllers.application.js
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Model Test', | |
model() { | |
return this.store.findAll('meetup') | |
} | |
}); |
NewerOlder