Google tab paths

Use tabs to choose results

目前為 2021-10-19 提交的版本,檢視 最新版本

// ==UserScript==
// @name        Google tab paths
// @description Use tabs to choose results
// @include     https://www.google.com/*
// @author      CennoxX
// @contact     [email protected]
// @homepage    https://twitter.com/CennoxX
// @namespace   https://gf.qytechs.cn/users/21515
// @version     0.7
// @grant       none
// ==/UserScript==
var result = document.querySelectorAll('.yuRUbf>a');
for (var i = 0; i < result.length; i++) {
    result[i].tabIndex = i+1;
}
document.querySelector('[role="link"]').tabIndex = -1;
document.querySelector('[role="link"]').nextElementSibling.tabIndex = -1;
document.querySelector('[role="link"]').nextElementSibling.nextElementSibling.childNodes[2].tabIndex = -1;
var nextLink = document.querySelector('#pnnext');
if (nextLink){
    nextLink.tabIndex = i + 2;
}

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址