Skip to content

Instantly share code, notes, and snippets.

document.querySelector('#chat').setAttribute('style',`
opacity: .9;
position: fixed;
top: 1rem;
right: 1rem;
`)
@ngseke
ngseke / observe.js
Last active June 27, 2021 06:06
Observe Youtube Chat Room Items
var $chatList = document
.querySelector('#chatframe')
.contentWindow
.document
.querySelector('#item-offset #items')
var observer = new MutationObserver(([{ target }]) => {
const items = [...target.querySelectorAll('yt-live-chat-text-message-renderer')]
.map($el => ({
img: $el.querySelector('#img').getAttribute('src'),
@ngseke
ngseke / fuck-interview-dot-tw.js
Last active July 28, 2021 09:10
fuck interview dot tw
function getVipButtons () {
return [...document.querySelectorAll('button.btn-exchange-vip')]
}
function getIsListLoaded () {
return document.querySelector('.interview-list').style.opacity === '1'
}
function goToNextPage () {
const $next = document.querySelector('.iw_pagination-item.iw_active').nextSibling.nextSibling.querySelector?.('a')
@ngseke
ngseke / number-separator.js
Last active October 12, 2021 03:38
以逗點分隔數字
const { format } = new Intl.NumberFormat('en-US')
console.log(format(14501405)) // 14,501,405
@ngseke
ngseke / thankful-rate.js
Last active March 18, 2022 03:03
計算外國 YouTuber 底下留言台灣感謝率
function calc () {
const patterns = [
{
regex: /(謝謝|感謝)/,
description: '普通感謝',
},
{
regex: /謝(.*?)(愛|喜)(.*?)灣/,
description: '精準感謝',
},
@ngseke
ngseke / cakeresume-company-blocker.user.js
Last active June 6, 2023 11:15
CakeResume Company Blocker: CakeResume 黑名單公司封鎖小幫手,避免誤擊你的前東家或者雷公司
// ==UserScript==
// @name CakeResume Company Blocker
// @namespace https://ngseke.me/
// @version 0.1
// @description 避免誤擊你的前東家或者雷公司
// @author ngseke
// @match *.cakeresume.com/jobs*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
@ngseke
ngseke / wikipedia-link-converter.user.js
Last active April 8, 2023 03:29
Convert Wikipedia Links to Desktop Version on Google Search
@ngseke
ngseke / customize-you-tube-caption-font.user.js
Last active January 16, 2024 09:17
把 YouTube CC 字幕變成粉圓體 `jf-openhuninn-2.0`
// ==UserScript==
// @name Customize YouTube Caption Font
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 把 YouTube CC 字幕變成粉圓體 `jf-openhuninn-2.0`(裝置內必須提前安裝此字體)
// @author You
// @match https://www.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// ==/UserScript==
@ngseke
ngseke / chatgpt-as-your-english-tutor.user.js
Last active June 13, 2024 12:09
ChatGPT as Your English Tutor
// ==UserScript==
// @name ChatGPT as Your English Tutor
// @namespace https://ngseke.me/
// @version 0.1
// @description ChatGPT as Your English Tutor
// @author ngseke
// @match https://chatgpt.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=openai.com
// @grant none
// ==/UserScript==
@ngseke
ngseke / wikipedia-title-with-chinese-translation.user.js
Last active June 10, 2023 07:06
Wikipedia Title with Chinese Translation
// ==UserScript==
// @name Wikipedia Title with Chinese Translation
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Wikipedia Title with Chinese Translation
// @author ngseke
// @match https://en.wikipedia.org/wiki/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=wikipedia.org
// @grant none
// ==/UserScript==