TWSE tweak

顯示表格全部資料

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @author craftwar
// @name TWSE tweak
// @description 顯示表格全部資料
// @copyright 2022, craftwar (https://craftwarblog.blogspot.com/)
// @license GPL-3.0-or-later; https://www.gnu.org/licenses/gpl-3.0.txt
// @homepageURL https://github.com/craftwar/userscript/tree/master/TWSE
// @version 0.1.20220830
// @namespace github.com.craftwar
// @match https://www.twse.com.tw/zh/page/trading/fund/TWT43U.html
// @match https://www.twse.com.tw/zh/page/trading/exchange/TWT93U.html
// @grant none
// @run-at document-idle
// ==/UserScript==

'use strict';
(() => {
	new MutationObserver((record, observer) => {
		const report_len = document.querySelector('select[name="report-table_length"]')
		if (report_len) {
			observer.disconnect();

			report_len.value = -1
			report_len.dispatchEvent(new Event('change'))
		}
	}).observe(document.body, { subtree: true, childList: true });
})();