您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Use '<' and '>' to change LinkedIn's pagination
- // ==UserScript==
- // @name Use keyboard to change pagination
- // @namespace https://github.com/gslin/use-keyboard-to-change-linkedin-pagination
- // @match https://www.linkedin.com/*
- // @grant none
- // @version 0.20240109.0
- // @author Gea-Suan Lin <gslin@gslin.com>
- // @description Use '<' and '>' to change LinkedIn's pagination
- // @license MIT
- // ==/UserScript==
- (() => {
- 'use strict';
- document.addEventListener('keyup', function(ev) {
- const ae = document.activeElement.tagName.toLowerCase();
- if ('input' === ae || 'textarea' === ae) {
- return;
- }
- if ('<' === ev.key) {
- document.querySelector('button[aria-label="Previous"]')?.click();
- return;
- }
- if ('>' === ev.key) {
- document.querySelector('button[aria-label="Next"]')?.click();
- return;
- }
- });
- })();