Last active
May 26, 2021 07:18
-
-
Save tokikanno/c809fdd6c33fc0c1125848f5f33872d7 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
| (() => { | |
| const parseNumberFromElement = (selector) => parseInt($(selector).text().replace(',', '')) | |
| const fmt = new Intl.NumberFormat('zh-TW') | |
| let v = parseNumberFromElement('#num1') - parseNumberFromElement('#num2') - parseNumberFromElement('#num3') | |
| let html = `<div class="EmbedBg TaiwanEmbed"> | |
| <div class="TWtotalTwEmbed"> | |
| <p class="TwTitle ">尚 未<br>判 定</p> | |
| <div class="TwEmbed1 outbreak_info_block" style="width: 440px;"> | |
| <div class="outbreak_info_class">通報數 - 排除 - 確診</div> | |
| <div class="outbreak_info_number">${fmt.format(v)}</div> | |
| </div> | |
| </div> | |
| </div>` | |
| $(html).insertAfter( | |
| $('#EmbedchartS .EmbedBg.TaiwanEmbed') | |
| ) | |
| v = parseNumberFromElement('#num6') - parseNumberFromElement('#num7') - parseNumberFromElement('#num8') | |
| html = `<div class="TaiwanEmbed"> | |
| <div class="TWtotalTwEmbed"> | |
| <p class="TwTitle ">尚 未<br>判 定</p> | |
| <div class="TwEmbed1 outbreak_info_block" style="width: 440px;"> | |
| <div class="outbreak_info_class">通報數 - 排除 - 確診</div> | |
| <div class="outbreak_info_number">${fmt.format(v)}</div> | |
| </div> | |
| </div> | |
| </div>` | |
| $(html).insertAfter( | |
| $('#EmbedchartS .TaiwanEmbed').not('.EmbedBg') | |
| ) | |
| })() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

簡單計算 CDC 網頁上未判定案例數量 (2021/5/25)