Greasy Fork 支持简体中文。

Auto-close SDQL tabs without active trends

Close the tab if today's date is not found in the table unless it's a nonstandard table OR the word Research appears in your query.

作者
swain scheps
今日安裝
0
安裝總數
12
評價
0 0 0
版本
2.0
建立日期
2023-09-23
更新日期
2023-09-23
尺寸
2.2 KB
授權條款
GNU GPLv3
腳本執行於

Most people bookmark SDQL queries in one or more folders, then open their bookmarked links and manually sift through them to find those with active trends for upcoming games. This script looks at the results table of your SDQL query and, if there are no rows where date>=today, it automatically closes the tab.

-This script only auto-closes newly opened browser tabs. Queries run on existing SDQL won't auto-close, regardless of what's in the results table. So you shouldn't have to de-activate it after you've run your pre-saved trends for the day (or week).

-The script will only auto-close tabs that look like the default results table. More specifically, it looks to see if 'Date' is the first column of the results table, if so, it's subject to auto-closing if it doesn't see a date that's >=today. The script won't auto-close tabs where the results table doesn't have 'Date' in the first column (e.g. a custom query).

-Include the word Research in your query if you have a bookmarked query that you don't want closed. If the script sees that word anywhere on the page, that tab won't be subject to being auto-closed. e.g. Add a dummy element at the beginning of your query like team!=Research

I added an 1 second pause because I was worried the script wouldn't wait long enough for all the content to load, but on second thought, I think these scripts always wait for the page to indicate it's done loading before firing, so you can probably reduce that setInterval value to 0. Note: I have not tested this script in any other browser besides Chrome 116 on Windows. Please reach out to me on Discord if you have questions or suggestions. Use and distribute freely, and if you make improvements, let me know about them. @swainscheps2