Skip to content

Instantly share code, notes, and snippets.

View YusukeHirao's full-sized avatar

Yusuke Hirao YusukeHirao

View GitHub Profile
@YusukeHirao
YusukeHirao / ARIA-Trigger.md
Last active May 28, 2022 08:05
ARIA Trigger

ARIA Trigger

Concept

The ARIA Driven Implements

<button type="button" aria-controls="DIALOG_ID">Open Dialog</button>
@YusukeHirao
YusukeHirao / listup.ts
Created September 28, 2021 08:53
ページをまたいだ表記揺れを検出する
import { JSDOM } from 'jsdom';
import { TextLintEngine } from 'textlint';
import TurndownService from 'turndown';
import fs from 'fs/promises';
import path from 'path';
import { promisify } from 'util';
import sGlob from 'glob';
const glob = promisify(sGlob);
@YusukeHirao
YusukeHirao / Page.vue
Last active October 8, 2019 07:30
子コンポーネントの制約を作る
<template>
<div>
<x-container>
<x-image />
<x-text>
<p>lorem ipsam</p>
</x-text>
</x-container>
</div>
</template>
@YusukeHirao
YusukeHirao / profile.md
Last active February 21, 2024 03:51
Profile

平尾ゆうてん

企業のウェブアクセシビリティに関するコンサルティングや顧問を行うかたわら、制作会社のアクセシビリティの推進・啓発活動も行い仲間を増やす活動をしている。社内ではフロントエンドテックリードとしてアクセシビリティを含めた品質向上と開発効率化に取り組む。アクセシビリティカンファレンス福岡実行委員長。HTMLリンター「Markuplint」の開発者。HTMLのプロ。

@YusukeHirao
YusukeHirao / api.ts
Last active November 22, 2018 11:16
Slack Web API
export async function slackAPI<
T extends SlackAPI = SlackAPI,
M extends keyof T = keyof SlackAPI
>(method: M, token: string, args?: { [key: string]: string }) {
const API_ENDPOINT = 'https://slack.com/api/';
const params = args
? Object.keys(args)
.map(key => `${key}=${args[key]}`)
.join('&')
: '';
@YusukeHirao
YusukeHirao / settings.js
Last active May 22, 2018 00:37
VS Code
// Place your settings in this file to overwrite the default settings
{
// エディター
// フォント ファミリを制御します。
"editor.fontFamily": "Fira Code",
// "editor.fontFamily": "Ricty Diminished",
"editor.fontLigatures": true,
@YusukeHirao
YusukeHirao / adobe-animate-loader.js
Created May 19, 2017 10:17
Webpack loader to allow "require" of JavaScript files generated by Adobe Animate CC
module.exports = (content) => `var createjs = window.createjs;${content};module.exports = { lib, images, createjs, ss, AdobeAn };`;
@YusukeHirao
YusukeHirao / x-video.tag
Created April 5, 2016 14:31
SPAで動画を使って大ヤケドした話 ref: http://qiita.com/YusukeHirao/items/ccc0d4eac9d82275d8bb
// 消す
if (this.track) {
this.video.removeChild(this.track)
this.track = null
}
// 新しく要素を生成する
this.track = document.createElement('track')
this.video.appendChild(this.track)
this.video.src = '/path/filename.mp4'
@YusukeHirao
YusukeHirao / file0.js
Created March 4, 2016 16:48
YouTubeの字幕をカスタマイズする ref: http://qiita.com/YusukeHirao/items/3177798d2cee3ce0e472
import superagent from 'superagent'
const YOUTUBE_VIDEO_TIMED_TEXT_API = 'http://video.google.com/timedtext'
const lang = 'ja'
const videoId = 'videoId'
const ccList = []
let ccTrackName;
requestCCList () {
superagent
@YusukeHirao
YusukeHirao / spoff4bc.js
Last active August 29, 2015 14:24
baserCMSのsmartphone=off時のリダイレクトスニペット
/**
* smartphone=off対応
*
*/
var key = 'smartphone';
var val = 'off';
var dir = 'sp';
// URLパラメータにsmartphoneがある場合、
// リンク先にもパラメータを追加する