This file contains hidden or 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 { parse } from "https://deno.land/std/flags/mod.ts"; | |
// API specification: http://zipcloud.ibsnet.co.jp/doc/api | |
// deno run --allow-net main.ts 264-0032 | |
interface ZipcloudResponseBodyResult { | |
address1: string; | |
address2: string; | |
address3: string; | |
kana1: string; |
This file contains hidden or 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
//スポンサープロダクトを弾く(背景色を赤に) | |
Array.from(document.querySelectorAll('div')) | |
.filter((elem) => { //スポンサープロダクトを判定するdiv | |
var attrValue = elem.getAttribute('data-component-type'); | |
if( attrValue == null ){ return false; } //これを入れないとnullで落ちる | |
return attrValue.indexOf('sp-sponsored-result')>=0; }) //ぴったり文字列一致なのでindexOfは0以上で取る | |
.forEach((elem) => { //着色 | |
elem.style.backgroundColor = 'red'; | |
}); |