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() { | |
const sm = window.soundManager | |
const soundId = sm.soundIDs[0] | |
if (!soundId) { | |
alert('No sound found.') | |
return | |
} | |
if (document.querySelector('.ext')) return |
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() { | |
const sm = window.soundManager | |
const soundId = sm.soundIDs[0] | |
const playBackward = -15 | |
const askPlaybackRate = () => { | |
console.log(sm.getSoundById(soundId)) | |
sm.setPlaybackRate( | |
soundId, | |
window.prompt('set playbackRate', sm.getSoundById(soundId).playbackRate || 1) || 1 |
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
<div class="post-count"> | |
<span class="post-count__filtered">[[posts.length]]</span> | |
/ | |
<span class="post-count__raw">[[rawPosts.length]]</span> | |
</div> | |
const app = new Vue({ | |
el: '#episode-list', | |
delimiters: ['[[', ']]'], // Avoid to conflict to Jekyll template | |
components: { |
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
rawPosts: [ | |
{% for post in site.posts %} | |
{% capture desc %}{% include post_description.inc post=post %}{% endcapture %} | |
{ | |
"url": {{ post.url | jsonify }}, | |
"title": {{ post.title | jsonify }}, | |
"actors": [ | |
{% for actor_id in post.actor_ids %} | |
{ | |
{% assign actor = site.actors | where:"actor_id", actor_id | first %} |
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
<ul class="actor-links"> | |
{% assign post_actor_ids = site.posts | map: 'actor_ids' | join: ',' | split: ',' | sort %} | |
{% assign actor_and_count = '' | split: '.' %} | |
{% for actor in site.actors %} | |
{% assign count = 0 %} | |
{% for post_actor_id in post_actor_ids %} | |
{% if actor.actor_id == post_actor_id %} | |
{% assign count = count | plus: 1 %} |
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 childCount = | |
transform | |
.ObserveEveryValueChanged (t => t.childCount) | |
.ToReactiveProperty (); | |
childCount | |
.Subscribe(c => hoge); | |
// transformに子オブジェクトが無い(transform.childCount == 0)状態で開始したとき |
NewerOlder