Created
July 6, 2020 19:18
-
-
Save s-aska/eba1d2555aefa9a19e35e437fd3ea56b to your computer and use it in GitHub Desktop.
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
(function(){ | |
"use strict"; | |
const template = '<span class="fontsize-m" style="margin-right: 6px;"><a href="https://stocks.finance.yahoo.co.jp/stocks/detail/?code={{ .stock.Code }}.T" class="underline">{{ .stock.Code }}(JQ)</a></span>{{ .stock.Close | Commify }}円 <br class="show_sp"><small class="fontsize-m">前日比:{{ .stock.Diff | Commify }}円 出来高:{{ .stock.Volume | Commify }}株</small>'; | |
const script = document.createElement('script'); | |
script.src = 'https://denkei-agh-tools-prod.an.r.appspot.com/?callback=stockWidgetCallback&symbol=1783.T'; | |
const parent = document.getElementsByTagName('script')[0]; | |
parent.parentNode.insertBefore(script, parent); | |
window.stockWidgetCallback = (res) => { | |
console.log(res); | |
const inner = document.getElementById('widget-inner'); | |
inner.innerHTML = res; | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment