Skip to content

Instantly share code, notes, and snippets.

Avatar

急急如律令 kyukyunyorituryo

View GitHub Profile
@kyukyunyorituryo
kyukyunyorituryo / AddRuby.js
Created May 30, 2019
ルビ振りAPIようXMLパース
View AddRuby.js
// JavaScript source code
xml = '<ResultSet xmlns="urn:yahoo:jp:jlp:FuriganaService" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:yahoo:jp:jlp:FuriganaService https://jlp.yahooapis.jp/FuriganaService/V1/furigana.xsd">\n<Result>\n<WordList>\n<Word>\n<Surface>漢字</Surface>\n<Furigana>かんじ</Furigana>\n<Roman>kanzi</Roman>\n</Word>\n<Word>\n<Surface>かな交じり</Surface>\n<Furigana>かなまじり</Furigana>\n<Roman>kanamaziri</Roman>\n<SubWordList>\n<SubWord>\n<Surface>かな</Surface>\n<Furigana>かな</Furigana>\n<Roman>kana</Roman>\n</SubWord>\n<SubWord>\n<Surface>交</Surface>\n<Furigana>ま</Furigana>\n<Roman>ma</Roman>\n</SubWord>\n<SubWord>\n<Surface>じり</Surface>\n<Furigana>じり</Furigana>\n<Roman>ziri</Roman>\n</SubWord>\n</SubWordList>\n</Word>\n<Word>\n<Surface>文</Surface>\n<Furigana>ぶん</Furigana>\n<Roman>bun</Roman>\n</Word>\n<Word>\n<Surface>に</Surface>\n</Word>\n<Word>\n<Surface>ふりがな</Surface>\n</Word>\n<Word>\n<Surface>を</Surface>\n</Word>\n<Word>\n<Surface>振る</Surface>\n<Furigana>ふる</Furigana>\n<
View xmlpretty.html
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<script src="vkbeautify.js"></script>
<title>ページタイトル</title>
</head>
<body>
<script type="text/javascript">
function convert(){
@kyukyunyorituryo
kyukyunyorituryo / 校正支援.js
Created Jun 8, 2017
校正支援Meryマクロの途中でXMLを返す
View 校正支援.js
// -----------------------------------------------------------------------------
// 校正支援ツール
// 説明 選択した文字の校正支援する。
//
//
// 参考
// http://qiita.com/tnakagawa/items/3bce99d49b1aa3fc9a72
// http://qiita.com/tnakagawa/items/4b501c21abcd39f30fbe
// 使用API
// https://developer.yahoo.co.jp/webapi/jlp/kousei/v1/kousei.html
@kyukyunyorituryo
kyukyunyorituryo / manifest.json
Created Aug 7, 2016
Amazonのページを指定子てmyscriptを実行する
View manifest.json
{
"manifest_version": 2,
"name": "1-click remove",
"version": "1.0",
"content_scripts": [
{
"matches": ["http://www.amazon.co.jp/*","https://www.amazon.co.jp/*"],
"js": [ "myscript.js"]
}
]
@kyukyunyorituryo
kyukyunyorituryo / myscript.js
Last active Aug 27, 2016
Kindle Unlimited用に「1-Clickで今すぐ買う」を見えなくする
View myscript.js
var ku=document.getElementById("borrow-button");//PC用
var kum=document.getElementById("KU_logo_link");//スマホ用
if((ku|| kum) != null){//空なら実行しない
var element = document.getElementById("one-click-button");
var node = element.parentNode.parentNode;//親要素の親要素を削除
if(node != null){
node.parentNode.removeChild(node);
}
}
You can’t perform that action at this time.