您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
The script clicks the search on google button when the max free searches on kagi are reached.
- // ==UserScript==
- // @name Kagi redirection to Google for free tier
- // @namespace https://kagi.com/
- // @match https://kagi.com/?q=*
- // @description The script clicks the search on google button when the max free searches on kagi are reached.
- // @version 1.0
- // @noframes
- // @grant none
- // @license GNU GPLv3
- // ==/UserScript==
- (function () {
- 'use strict';
- var googButton = document.querySelectorAll('form.search-form button[formaction*="google"]');
- if(googButton.length != 1) {
- console.error('googButton is more than 1 selected element, ' + googButton.length);
- if(googButton.length == 0) {
- throw 'No button found';
- }
- }
- console.error('googButton is more than 1 selected element, ' + googButton.length);
- googButton[0].click();
- }());