Skip to content

Instantly share code, notes, and snippets.

@dofy
Last active January 19, 2024 21:41
Show Gist options
  • Save dofy/54caa572ad8eb87b446bf8a5f9dd77c9 to your computer and use it in GitHub Desktop.
Save dofy/54caa572ad8eb87b446bf8a5f9dd77c9 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Douban Hotkeys
// @description Show Hotkeys of douban.com in console
// @match *://www.douban.com/
// ==/UserScript==
const tables = []
function KEY(key, desc) {
this.key = key
this.desc = desc
}
const table = (key, desc) => {
tables.push(new KEY(key, desc))
}
table('/', 'focus search input box')
table('j', 'next status')
table('k', 'prev status')
table('a', 'like')
table('t', 'reply')
table('r', 'relay')
table('i', 'focus reply input box')
table('n', 'new status')
table('gg', 'go to top of page')
table('shift + g', 'go to bottom of page')
table('\{', 'prev page')
table('\}', 'next page')
table('p1', 'first page')
console.group('Douban Hotkeys')
console.table(tables)
console.groupEnd()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment